Thread (62 messages) 62 messages, 5 authors, 2014-10-13

Re: [PATCH] cpufreq, store_scaling_governor requires policy->rwsem to be held for duration of changing governors [v2]

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2014-08-05 07:46:50
Also in: lkml

On 2 August 2014 01:06, Stephen Boyd [off-list ref] wrote:
I have the same options. The difference is that my driver has a governor
per policy. That's set with the CPUFREQ_HAVE_GOVERNOR_PER_POLICY flag.
You may call me stupid but I got a bit confused after looking into the code
again. Why does the crash dump depends on this flag?

We *always* remove the governor specific directory while switching governors
(Ofcourse only if its updated for All CPUs). And so on a dual core platform,
where both CPU 0 & 1 share a clock line, switching of governors should result
in this crash dump?

I may know the answer to the stupid question I had, but not sure why that is a
problem. The only (and quite significant) difference that this flag makes
is the location of governor-specific directory:
- w/o this flag: /sys/devices/system/cpu/cpufreq/<here>
- w/ this flag: /sys/devices/system/cpu/cpu*/cpufreq/<here>

So, is there some issue with the sysfs lock for <cpu*/cpufreq/> node as while
switching governor we change  <cpu*/cpufreq/scaling_governor> at the same
location?

--
viresh

--
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help