Messages in this thread | | | From | Viresh Kumar <> | Date | Tue, 30 Oct 2018 11:27:38 +0530 | 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@linaro.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@linaro.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@linaro.org>
| |