From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750926AbcBJMc6 (ORCPT ); Wed, 10 Feb 2016 07:32:58 -0500 Received: from foss.arm.com ([217.140.101.70]:46765 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbcBJMc5 (ORCPT ); Wed, 10 Feb 2016 07:32:57 -0500 Date: Wed, 10 Feb 2016 12:33:42 +0000 From: Juri Lelli To: "Rafael J. Wysocki" Cc: Steve Muckle , "Rafael J. Wysocki" , Peter Zijlstra , Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Thomas Gleixner Subject: Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks Message-ID: <20160210123342.GA11415@e106622-lin> References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <56B93548.9090006@linaro.org> <5387313.xAhVpzgZCg@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5387313.xAhVpzgZCg@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 Hi Rafael, On 09/02/16 21:05, Rafael J. Wysocki wrote: [...] > +/** > + * cpufreq_update_util - Take a note about CPU utilization changes. > + * @util: Current utilization. > + * @max: Utilization ceiling. > + * > + * This function is called by the scheduler on every invocation of > + * update_load_avg() on the CPU whose utilization is being updated. > + */ > +void cpufreq_update_util(unsigned long util, unsigned long max) > +{ > + struct update_util_data *data; > + > + rcu_read_lock(); > + > + data = rcu_dereference(*this_cpu_ptr(&cpufreq_update_util_data)); > + if (data && data->func) > + data->func(data, cpu_clock(smp_processor_id()), util, max); Are util and max used anywhere? It seems to me that cpu_clock is used by the callbacks to check if the sampling period is elapsed, but I couldn't yet find who is using util and max. Thanks, - Juri