OSDN Git Service

cpufreq: interactive governor: apply intermediate load on current speed
authorTodd Poynor <toddpoynor@google.com>
Fri, 28 Oct 2011 01:25:59 +0000 (18:25 -0700)
committerTodd Poynor <toddpoynor@google.com>
Thu, 10 Nov 2011 02:57:57 +0000 (18:57 -0800)
Calculate intermediate speed by applyng CPU load to current speed, not
max speed.

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

index e1d5015..a085fc8 100644 (file)
@@ -162,7 +162,7 @@ static void cpufreq_interactive_timer(unsigned long data)
        if (cpu_load >= go_maxspeed_load)
                new_freq = pcpu->policy->max;
        else
-               new_freq = pcpu->policy->max * cpu_load / 100;
+               new_freq = pcpu->policy->cur * cpu_load / 100;
 
        if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,
                                           new_freq, CPUFREQ_RELATION_H,