aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Poynor2012-12-19 18:06:48 -0600
committerArve Hjønnevåg2013-02-19 19:56:09 -0600
commit1e18b4ba037b89caa3a3e5653e50e7f88e5b8127 (patch)
tree9993b0adafbefd7b8521288d4a413c6eb00c184b
parent9edf06dc7ef35dc9a0ad8f3bd3cc0f940876046a (diff)
downloadkernel-common-1e18b4ba037b89caa3a3e5653e50e7f88e5b8127.tar.gz
kernel-common-1e18b4ba037b89caa3a3e5653e50e7f88e5b8127.tar.xz
kernel-common-1e18b4ba037b89caa3a3e5653e50e7f88e5b8127.zip
cpufreq: interactive: fix boosting logic
35a84de cpufreq: interactive: apply above_hispeed_delay to each step above hispeed caused the speed choice logic to osciallate between boosting and not boosting. Add back code to ensure speed does not drop below boost frequency while boosting. Change-Id: Id420068480fcc7f5c4989ff523e2a8d22e2f4db2 Signed-off-by: Todd Poynor <toddpoynor@google.com>
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index ddface4d02c..0c00b6db260 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -297,11 +297,18 @@ static void cpufreq_interactive_timer(unsigned long data)
297 cpu_load = loadadjfreq / pcpu->target_freq; 297 cpu_load = loadadjfreq / pcpu->target_freq;
298 boosted = boost_val || now < boostpulse_endtime; 298 boosted = boost_val || now < boostpulse_endtime;
299 299
300 if ((cpu_load >= go_hispeed_load || boosted) && 300 if (cpu_load >= go_hispeed_load || boosted) {
301 pcpu->target_freq < hispeed_freq) 301 if (pcpu->target_freq < hispeed_freq) {
302 new_freq = hispeed_freq; 302 new_freq = hispeed_freq;
303 else 303 } else {
304 new_freq = choose_freq(pcpu, loadadjfreq);
305
306 if (new_freq < hispeed_freq)
307 new_freq = hispeed_freq;
308 }
309 } else {
304 new_freq = choose_freq(pcpu, loadadjfreq); 310 new_freq = choose_freq(pcpu, loadadjfreq);
311 }
305 312
306 if (pcpu->target_freq >= hispeed_freq && 313 if (pcpu->target_freq >= hispeed_freq &&
307 new_freq > pcpu->target_freq && 314 new_freq > pcpu->target_freq &&