aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStratos Karafotis <stratosk@semaphore.gr>2013-03-05 17:06:40 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-31 19:11:35 -0400
commit27ed3cd2ebf4cd78b198be9758c538cdede36d8a (patch)
tree7d1e5bc92a1722752daed3762ef83130c56a65c2
parent7af1c0568d33339318c6710381921a3a3d40eebb (diff)
cpufreq: conservative: Fix the logic in frequency decrease checking
When we evaluate the CPU load for frequency decrease we have to compare the load against down_threshold. There is no need to subtract 10 points from down_threshold. Instead, we have to use the default down_threshold or user's selection unmodified. Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index d746d6abbca8..0d6a9e55ac8c 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -86,12 +86,8 @@ static void cs_check_cpu(int cpu, unsigned int load)
86 return; 86 return;
87 dbs_info->down_skip = 0; 87 dbs_info->down_skip = 0;
88 88
89 /* 89 /* Check for frequency decrease */
90 * The optimal frequency is the frequency that is the lowest that can 90 if (load < cs_tuners->down_threshold) {
91 * support the current CPU usage without triggering the up policy. To be
92 * safe, we focus 10 points under the threshold.
93 */
94 if (load < (cs_tuners->down_threshold - 10)) {
95 /* 91 /*
96 * if we cannot reduce the frequency anymore, break out early 92 * if we cannot reduce the frequency anymore, break out early
97 */ 93 */