From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932822AbdC2VZC (ORCPT ); Wed, 29 Mar 2017 17:25:02 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:44577 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbdC2VYm (ORCPT ); Wed, 29 Mar 2017 17:24:42 -0400 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: Ingo Molnar , Peter Zijlstra , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , smuckle.linux@gmail.com, juri.lelli@arm.com, Morten.Rasmussen@arm.com, patrick.bellasi@arm.com, eas-dev@lists.linaro.org Subject: Re: [RFC 1/9] sched: cpufreq: add cpu to update_util_data Date: Wed, 29 Mar 2017 23:18:58 +0200 Message-ID: <124246869.3DNVVaenSV@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.10.0+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <529d5f2d865f5982f7e0d4a7a44176e81f50ffc5.1489058244.git.viresh.kumar@linaro.org> References: <529d5f2d865f5982f7e0d4a7a44176e81f50ffc5.1489058244.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, March 09, 2017 05:15:11 PM Viresh Kumar wrote: > From: Steve Muckle > > Upcoming support for scheduler cpufreq callbacks on remote wakeups > will require the client to know what the target CPU is that the > callback is being invoked for. Add this information into the callback > data structure. > > Signed-off-by: Steve Muckle > Signed-off-by: Viresh Kumar > --- > include/linux/sched/cpufreq.h | 1 + > kernel/sched/cpufreq.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/include/linux/sched/cpufreq.h b/include/linux/sched/cpufreq.h > index d2be2ccbb372..f798f63d93e8 100644 > --- a/include/linux/sched/cpufreq.h > +++ b/include/linux/sched/cpufreq.h > @@ -16,6 +16,7 @@ > #ifdef CONFIG_CPU_FREQ > struct update_util_data { > void (*func)(struct update_util_data *data, u64 time, unsigned int flags); > + int cpu; unsigned int? > }; > > void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, > diff --git a/kernel/sched/cpufreq.c b/kernel/sched/cpufreq.c > index dbc51442ecbc..ee4c596b71b4 100644 > --- a/kernel/sched/cpufreq.c > +++ b/kernel/sched/cpufreq.c > @@ -42,6 +42,7 @@ void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, > return; > > data->func = func; > + data->cpu = cpu; But I'm not convinced that this helps at all. > rcu_assign_pointer(per_cpu(cpufreq_update_util_data, cpu), data); > } > EXPORT_SYMBOL_GPL(cpufreq_add_update_util_hook); > Thanks, Rafael