[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOh2x=my6pusOOgKNhk4O3iE3TaTLjeZ6q86MdH4q10BB6dnEg@mail.gmail.com>
Date: Tue, 30 Oct 2018 11:27:38 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Vincent Guittot <vincent.guittot@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
kstewart@...uxfoundation.org, Juri Lelli <juri.lelli@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/4] base/drivers/arch_topology: Replace mutex with
READ_ONCE / WRITE_ONCE
On Mon, Oct 29, 2018 at 9:54 PM Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
>
> The mutex protects a per_cpu variable access. The potential race can
> happen only when the cpufreq governor module is loaded and at the same
> time the cpu capacity is changed in the sysfs.
>
> There is no real interest of using a mutex to protect a variable
> assignation when there is no situation where a task can take the lock
> and block.
>
> Replace the mutex by READ_ONCE / WRITE_ONCE.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---
> drivers/base/arch_topology.c | 7 +------
> include/linux/arch_topology.h | 2 +-
> 2 files changed, 2 insertions(+), 7 deletions(-)
Reviewed-by: Viresh Kumar <viresh.kumar@...aro.org>
Powered by blists - more mailing lists