From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751905AbcBHLwx (ORCPT ); Mon, 8 Feb 2016 06:52:53 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35079 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbcBHLwv (ORCPT ); Mon, 8 Feb 2016 06:52:51 -0500 Date: Mon, 8 Feb 2016 17:22:48 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM list , Linux Kernel Mailing List , Peter Zijlstra , Srinivas Pandruvada , Juri Lelli , Steve Muckle , Thomas Gleixner Subject: Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks Message-ID: <20160208115248.GC8294@vireshk> References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <20160207091040.GA6112@vireshk> <1855005.ZFAA5ekheo@vostro.rjw.lan> <2172360.cldhrkXzeh@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2172360.cldhrkXzeh@vostro.rjw.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-02-16, 03:08, Rafael J. Wysocki wrote: > Moreover, update_sampling_rate() doesn't need to walk the cpu_dbs_infos, > it may walk policies instead. Like after the (untested) appended patch. > > Then, if we have a governor_data_lock in struct policy, we can use that > to protect policy_dbs while it is being access there and we're done. > > I'll try to prototype something along these lines tomorrow. I have solved that in a different way, and dropped the lock from update_sampling_rate(). Please see if that looks good. -- viresh