diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-05-12 12:22:34 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-05-15 02:44:17 +0200 |
commit | 4573237b01221881702fbe6655f3ae5135be1c18 (patch) | |
tree | f4923a1b61a7c7fb7a407bc067ea98a835a5cd16 /block | |
parent | 9104bb26c740cd4b2c9ee927f3caabbde0414558 (diff) | |
download | op-kernel-dev-4573237b01221881702fbe6655f3ae5135be1c18.zip op-kernel-dev-4573237b01221881702fbe6655f3ae5135be1c18.tar.gz |
cpufreq: Manage governor usage history with 'policy->last_governor'
History of which governor was used last is common to all CPUs within a
policy and maintaining it per-cpu isn't the best approach for sure.
Apart from wasting memory, this also increases the complexity of
managing this data structure as it has to be updated for all CPUs.
To make that somewhat simpler, lets store this information in a new
field 'last_governor' in struct cpufreq_policy and update it on removal
of last cpu of a policy.
As a side-effect it also solves an old problem, consider a system with
two clusters 0 & 1. And there is one policy per cluster.
Cluster 0: CPU0 and 1.
Cluster 1: CPU2 and 3.
- CPU2 is first brought online, and governor is set to performance
(default as cpufreq_cpu_governor wasn't set).
- Governor is changed to ondemand.
- CPU2 is taken offline and cpufreq_cpu_governor is updated for CPU2.
- CPU3 is brought online.
- Because cpufreq_cpu_governor wasn't set for CPU3, the default governor
performance is picked for CPU3.
This patch fixes the bug as we now have a single variable to update for
policy.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions