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: Prarit Bhargava <hidden>
Date: 2014-07-31 21:08:18
Also in: lkml


On 07/31/2014 04:38 PM, Saravana Kannan wrote:
On 07/31/2014 01:30 PM, Prarit Bhargava wrote:
quoted

On 07/31/2014 04:24 PM, Saravana Kannan wrote:
quoted
Prarit,

I'm not an expert on sysfs locking, but I would think the specific sysfs lock
would depend on the file/attribute group. So, can you please try to hotplug a
core in/out (to trigger the POLICY_EXIT) and then read a sysfs file exported by
the governor? scaling_governor doesn't cut it since that file is not removed on
policy exit event to governor. If it's ondemand, try reading/write it's sampling
rate file.
Thanks Saravana -- will do.  I will get back to you shortly on this.
Thanks. Btw, in case you weren't already aware of it. You'll have to hoplug out
all the CPUs in a cluster to trigger a POLICY_EXIT for that cluster/policy.
Yep -- the affected_cpus file should show all the cpus in the policy IIRC.  One
of the systems I have has 1 cpu/policy and has 48 threads so the POLICY_EXIT is
called.

I'll put something like

while [1];
do
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 20000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 0 > /sys/devices/system/cpu/cpu1/online
sleep 1
echo 1 > /sys/devices/system/cpu/cpu1/online
sleep 1
done

and let it run unless you can think of something else.  FWIW, manually trying
that yields no problems AFAICT.  The sleeps are just me being paranoid and
keeping things in sequence.

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