1
0
Fork 0

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>
hifive-unleashed-5.1
Stratos Karafotis 2013-03-05 22:06:40 +00:00 committed by Rafael J. Wysocki
parent 7af1c0568d
commit 27ed3cd2eb
1 changed files with 2 additions and 6 deletions

View 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
*/