cpufreq: interactive: based hispeed bump on target freq, not actual
authorTodd Poynor <toddpoynor@google.com>
Thu, 19 Apr 2012 19:52:48 +0000 (12:52 -0700)
committerTodd Poynor <toddpoynor@google.com>
Fri, 20 Apr 2012 02:45:37 +0000 (19:45 -0700)
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 c9f348f966d6dc23f4808d0b2a41868729d28f51..6a9f6c23ae642db4af5b4214cb97ba9a0bef4255 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;