cpufreq: interactive: base hispeed bump on target freq, not actual
authorTodd Poynor <toddpoynor@google.com>
Thu, 19 Apr 2012 19:52:48 +0000 (12:52 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:36 +0000 (13:52 -0800)
For systems that set a common speed for all CPUs, checking current
speed here could bypass the intermediate hispeed bump decision for
this CPU when another CPU was already at hispeed.  This could
result in an overly high setting (for all CPUs) in situations
where all CPUs were about to drop to load levels that map to
hispeed or below.

Change-Id: I186f23dcfc5e2b6336cab8b0327f0c8a9a4482bc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
drivers/cpufreq/cpufreq_interactive.c

index bf8d7727311f30cec30d9b7895a46ed5b02d5096..b78174fd8cff126fc3f60bf3ce6d58c762f81dac 100644 (file)
@@ -174,7 +174,7 @@ static void cpufreq_interactive_timer(unsigned long data)
                cpu_load = load_since_change;
 
        if (cpu_load >= go_hispeed_load) {
-               if (pcpu->policy->cur == pcpu->policy->min) {
+               if (pcpu->target_freq <= pcpu->policy->min) {
                        new_freq = hispeed_freq;
                } else {
                        new_freq = pcpu->policy->max * cpu_load / 100;