Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbcCDM64 (ORCPT ); Fri, 4 Mar 2016 07:58:56 -0500 Received: from mail-lb0-f194.google.com ([209.85.217.194]:35837 "EHLO mail-lb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbcCDM6x (ORCPT ); Fri, 4 Mar 2016 07:58:53 -0500 MIME-Version: 1.0 In-Reply-To: <20160304105007.GB4061@e106622-lin> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <2409306.qzzMXcm4dm@vostro.rjw.lan> <3276406.TfbasUEj6b@vostro.rjw.lan> <20160304105007.GB4061@e106622-lin> Date: Fri, 4 Mar 2016 13:58:51 +0100 X-Google-Sender-Auth: j0FN7K30PHT03TM8ApywYYtbilo Message-ID: Subject: Re: [PATCH v2 9/10] cpufreq: sched: Re-introduce cpufreq_update_util() From: "Rafael J. Wysocki" To: Juri Lelli Cc: "Rafael J. Wysocki" , 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1093 Lines: 40 On Fri, Mar 4, 2016 at 11:50 AM, Juri Lelli wrote: > 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). Yup, thanks! I had to propagate the change throughout the queue and forgot about the last step. I'll send an updated patch shortly. Thanks, Rafael