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-08-01 19:43:43
Also in: lkml


On 08/01/2014 03:36 PM, Stephen Boyd wrote:
On 08/01/14 12:15, Prarit Bhargava wrote:
quoted
On 08/01/2014 01:18 PM, Stephen Boyd wrote:
quoted
On 08/01/14 03:27, Prarit Bhargava wrote:
quoted
Can you send me the test and the trace of the deadlock?  I'm not creating it with:
This was with conservative as the default, and switching to ondemand

# cd /sys/devices/system/cpu/cpu2/cpufreq
# ls
affected_cpus                  scaling_available_governors
conservative                   scaling_cur_freq
cpuinfo_cur_freq               scaling_driver
cpuinfo_max_freq               scaling_governor
cpuinfo_min_freq               scaling_max_freq
cpuinfo_transition_latency     scaling_min_freq
related_cpus                   scaling_setspeed
scaling_available_frequencies  stats
# cat conservative/down_threshold
20
# echo ondemand > scaling_governor
Thanks Stephen,

There's obviously a difference in our .configs.  I have a global conservative
directory, ie) /sys/devices/system/cpu/cpufreq/conservative instead of a per-cpu
governor file.

ie) what are your .config options for CPUFREQ?

Mine are:

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

Is there some other config option I have to set?
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.
If I remove that flag I can't trigger the lockdep splat anymore with
this sequence and your patch.
I see -- so you're seeing this on arm then?  If so, let me know so I can reserve
one to work on :)

Thanks!

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