From: Ruchi Kandoi Date: Fri, 13 Jun 2014 23:24:15 +0000 (-0700) Subject: cpufreq: interactive: prevents the frequency to directly raise above the X-Git-Tag: firefly_0821_release~4090^2~314 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4c7894cb01c7544225d5fcfb0fcb1d11fd2d1777;p=firefly-linux-kernel-4.4.55.git cpufreq: interactive: prevents the frequency to directly raise above the hispeed_freq from a lower frequency. When the load was below go_hispeed_load, there is a possibility that choose_freq() would return a frequency which would be higher than the hispeed_freq. According to the policy we should first jump to the hispeed_freq, stay there for above_hispeed_delay and then be allowed to raise higher than that. Added a check to prevent the frequency to be directly raised to something higher than the hispeed_freq. Change-Id: Icda5d848dd9beadcc18835082ddf269732c75bd0 Signed-off-by: Ruchi Kandoi --- diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index a376dfa8f412..437aaed57057 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -417,6 +417,9 @@ static void cpufreq_interactive_timer(unsigned long data) } } else { new_freq = choose_freq(pcpu, loadadjfreq); + if (new_freq > tunables->hispeed_freq && + pcpu->target_freq < tunables->hispeed_freq) + new_freq = tunables->hispeed_freq; } if (pcpu->target_freq >= tunables->hispeed_freq &&