summaryrefslogtreecommitdiffstats
path: root/MAINTAINERS
diff options
context:
space:
mode:
authorViresh Kumar2015-10-29 03:38:38 +0100
committerRafael J. Wysocki2015-11-02 02:07:11 +0100
commit3a91b069eabf5dc8d4cd6f3e66dcd700536ef9f8 (patch)
treefe3002f1340886b66ad188a226a440673b059436 /MAINTAINERS
parentintel_pstate: decrease number of "HWP enabled" messages (diff)
downloadkernel-qcow2-linux-3a91b069eabf5dc8d4cd6f3e66dcd700536ef9f8.tar.gz
kernel-qcow2-linux-3a91b069eabf5dc8d4cd6f3e66dcd700536ef9f8.tar.xz
kernel-qcow2-linux-3a91b069eabf5dc8d4cd6f3e66dcd700536ef9f8.zip
cpufreq: governor: Quit work-handlers early if governor is stopped
gov_queue_work() acquires cpufreq_governor_lock to allow cpufreq_governor_stop() to drain delayed work items possibly scheduled on CPUs that share the policy with a CPU being taken offline. However, the same goal may be achieved in a more straightforward way if the policy pointer in the struct cpu_dbs_info matching the policy CPU is reset upfront by cpufreq_governor_stop() under the timer_mutex belonging to it and checked against NULL, under the same lock, at the beginning of dbs_timer(). In that case every instance of dbs_timer() run for a struct cpu_dbs_info sharing the policy pointer in question after cpufreq_governor_stop() has started will notice that that pointer is NULL and bail out immediately without queuing up any new work items. In turn, gov_cancel_work() called by cpufreq_governor_stop() before destroying timer_mutex will wait for all of the delayed work items currently running on the CPUs sharing the policy to drop the mutex, so it may be destroyed safely. Make cpufreq_governor_stop() and dbs_timer() work as described and modify gov_queue_work() so it does not acquire cpufreq_governor_lock any more. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions