cpufreq: interactive: set at least hispeed when above hispeed load

If load is above go_hispeed_load, always go to at least hispeed_freq,
even when reducing speed from a higher speed, not just when jumping
up from minimum speed.  Avoids running at a lower than intended
speed after a burst of even higher load.

Change-Id: I5b9d2a15ba25ce609b21bac7c724265cf6838dee
Signed-off-by: Todd Poynor <toddpoynor@google.com>
This commit is contained in:
Todd Poynor
2012-04-06 19:50:12 -07:00
committed by John Stultz
parent 077dfe8ba5
commit 7b2dc7eab9

View File

@@ -166,10 +166,14 @@ 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->policy->cur == pcpu->policy->min) {
new_freq = hispeed_freq;
else
} else {
new_freq = pcpu->policy->max * cpu_load / 100;
if (new_freq < hispeed_freq)
new_freq = hispeed_freq;
}
} else {
new_freq = pcpu->policy->max * cpu_load / 100;
}