cpufreq: interactive: apply intermediate load to max speed not current
authorTodd Poynor <toddpoynor@google.com>
Fri, 6 Apr 2012 08:13:09 +0000 (01:13 -0700)
committerTodd Poynor <toddpoynor@google.com>
Mon, 9 Apr 2012 22:06:33 +0000 (15:06 -0700)
Evaluate spikes in load (below go_hispeed_load) against the maximum
speed supported by the device, not the current speed (which tends to
make it too difficult to raise speed to intermediate levels until
very busy).

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

index 7b4efd55c892f77057acc1c6a81a58033095ac90..b14156220cdf7f5271cbc187ce7bc3ccf2ce0dbb 100644 (file)
@@ -172,7 +172,7 @@ static void cpufreq_interactive_timer(unsigned long data)
                else
                        new_freq = pcpu->policy->max * cpu_load / 100;
        } else {
-               new_freq = pcpu->policy->cur * cpu_load / 100;
+               new_freq = pcpu->policy->max * cpu_load / 100;
        }
 
        if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,