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>
This commit is contained in:
parent
7af1c0568d
commit
27ed3cd2eb
1 changed files with 2 additions and 6 deletions
|
@ -86,12 +86,8 @@ static void cs_check_cpu(int cpu, unsigned int load)
|
||||||
return;
|
return;
|
||||||
dbs_info->down_skip = 0;
|
dbs_info->down_skip = 0;
|
||||||
|
|
||||||
/*
|
/* Check for frequency decrease */
|
||||||
* The optimal frequency is the frequency that is the lowest that can
|
if (load < cs_tuners->down_threshold) {
|
||||||
* 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)) {
|
|
||||||
/*
|
/*
|
||||||
* if we cannot reduce the frequency anymore, break out early
|
* if we cannot reduce the frequency anymore, break out early
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue