Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752003AbcCDKtJ (ORCPT ); Fri, 4 Mar 2016 05:49:09 -0500 Received: from foss.arm.com ([217.140.101.70]:43115 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbcCDKtD (ORCPT ); Fri, 4 Mar 2016 05:49:03 -0500 Date: Fri, 4 Mar 2016 10:50:07 +0000 From: Juri Lelli To: "Rafael J. Wysocki" Cc: Linux PM list , Steve Muckle , ACPI Devel Maling List , Linux Kernel Mailing List , Peter Zijlstra , Srinivas Pandruvada , Viresh Kumar , Vincent Guittot , Michael Turquette , Ingo Molnar Subject: Re: [PATCH v2 9/10] cpufreq: sched: Re-introduce cpufreq_update_util() Message-ID: <20160304105007.GB4061@e106622-lin> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <2409306.qzzMXcm4dm@vostro.rjw.lan> <3276406.TfbasUEj6b@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3276406.TfbasUEj6b@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 839 Lines: 33 Hi Rafael, On 04/03/16 04:18, Rafael J. Wysocki wrote: [...] > +/** > + * cpufreq_update_util - Take a note about CPU utilization changes. > + * @time: Current time. > + * @util: CPU utilization. > + * @max: CPU capacity. > + * > + * This function is called on every invocation of update_load_avg() on the CPU > + * whose utilization is being updated. > + * > + * It can only be called from RCU-sched read-side critical sections. > + */ > +void cpufreq_update_util(u64 time, unsigned long util, unsigned long max) > +{ > + struct freq_update_hook *hook; > + > +#ifdef CONFIG_LOCKDEP > + WARN_ON(debug_locks && !rcu_read_lock_sched_held()); > +#endif > + > + hook = rcu_dereference(*this_cpu_ptr(&cpufreq_freq_update_hook)); Small fix. You forgot to change this to rcu_dereference_sched() (you only fixed that in 01/10). Best, - Juri