summaryrefslogtreecommitdiff
path: root/drivers/pps
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-12-03 04:07:49 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-07 01:20:10 (GMT)
commite128c864070055e062f6c90c64c03aad18452ac3 (patch)
tree42f57d730c2d84589821c80c23b0f1f56250b16d /drivers/pps
parent527e9316f8ec44bd53d90fb9f611fa7ffff52bb9 (diff)
downloadlinux-e128c864070055e062f6c90c64c03aad18452ac3.tar.xz
cpufreq: ondemand: Update sampling rate only for concerned policies
We are comparing policy->governor against cpufreq_gov_ondemand to make sure that we update sampling rate only for the concerned CPUs. But that isn't enough. In case of governor_per_policy, there can be multiple instances of ondemand governor and we will always end up updating all of them with current code. What we rather need to do, is to compare dbs_data with poilcy->governor_data, which will match only for the policies governed by dbs_data. This code is also racy as the governor might be getting stopped at that time and we may end up scheduling work for a policy, which we have just disabled. Fix that by protecting the entire function with &od_dbs_cdata.mutex, which will prevent against races with policy START/STOP/etc. After these locks are in place, we can safely get the policy via per-cpu dbs_info. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pps')
0 files changed, 0 insertions, 0 deletions