[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170413024636.GJ5910@vireshk-i7>
Date: Thu, 13 Apr 2017 08:16:36 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"David S. Miller" <davem@...emloft.net>,
Fenghua Yu <fenghua.yu@...el.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Lai Jiangshan <jiangshanlai@...il.com>,
Len Brown <lenb@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
"Rafael J. Wysocki" <rjw@...ysocki.net>, Tejun Heo <tj@...nel.org>,
Tony Luck <tony.luck@...el.com>, linux-pm@...r.kernel.org
Subject: Re: [patch 10/13] cpufreq/sh: Replace racy task affinity logic
On 12-04-17, 22:07, Thomas Gleixner wrote:
> The target() callback must run on the affected cpu. This is achieved by
> temporarily setting the affinity of the calling thread to the requested CPU
> and reset it to the original affinity afterwards.
>
> That's racy vs. concurrent affinity settings for that thread resulting in
> code executing on the wrong CPU.
>
> Replace it by work_on_cpu(). All call pathes which invoke the callbacks are
> already protected against CPU hotplug.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Viresh Kumar <viresh.kumar@...aro.org>
> Cc: linux-pm@...r.kernel.org
> ---
> drivers/cpufreq/sh-cpufreq.c | 45 +++++++++++++++++++++++++------------------
> 1 file changed, 27 insertions(+), 18 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists