From: Todd Poynor Date: Fri, 28 Oct 2011 01:25:59 +0000 (-0700) Subject: cpufreq: interactive governor: apply intermediate load on current speed X-Git-Tag: firefly_0821_release~7613^2~231 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a610c81ee00468c769e883845a68e688b01a7ca0;p=firefly-linux-kernel-4.4.55.git cpufreq: interactive governor: apply intermediate load on current speed Calculate intermediate speed by applyng CPU load to current speed, not max speed. Change-Id: Idecf598b9a203b07c989c5d9e9c6efc67a1afc2e Signed-off-by: Todd Poynor --- diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index e1d5015f1f5e..a085fc86733b 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -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,