cpufreq: conservative: Fix the logic in frequency decrease checking
authorStratos Karafotis <stratosk@semaphore.gr>
Tue, 5 Mar 2013 22:06:40 +0000 (22:06 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 31 Mar 2013 23:11:35 +0000 (01:11 +0200)
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>
drivers/cpufreq/cpufreq_conservative.c

index d746d6abbca8a04f703072f0241a8129e6b7c4d0..0d6a9e55ac8cab11a80251a7335fdaf81a76d892 100644 (file)
@@ -86,12 +86,8 @@ static void cs_check_cpu(int cpu, unsigned int load)
                return;
        dbs_info->down_skip = 0;
 
-       /*
-        * The optimal frequency is the frequency that is the lowest that can
-        * support the current CPU usage without triggering the up policy. To be
-        * safe, we focus 10 points under the threshold.
-        */
-       if (load < (cs_tuners->down_threshold - 10)) {
+       /* Check for frequency decrease */
+       if (load < cs_tuners->down_threshold) {
                /*
                 * if we cannot reduce the frequency anymore, break out early
                 */