diff mbox

[03/70] cpufreq: interactive: apply intermediate load to max speed not current

Message ID 1445967059-6897-3-git-send-email-czoborbalint@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Balint Czobor Oct. 27, 2015, 5:29 p.m. UTC
From: Todd Poynor <toddpoynor@google.com>

Evaluate spikes in load (below go_hispeed_load) against the maximum
speed supported by the device, not the current speed (which tends to
make it too difficult to raise speed to intermediate levels until
very busy).

Change-Id: Ib937006abf8bedb60891a739acd733e89b732ae0
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Bálint Czobor <czoborbalint@gmail.com>
---
 drivers/cpufreq/cpufreq_interactive.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 62e7456..e3bbe82 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -171,7 +171,7 @@  static void cpufreq_interactive_timer(unsigned long data)
 		else
 			new_freq = pcpu->policy->max * cpu_load / 100;
 	} else {
-		new_freq = pcpu->policy->cur * cpu_load / 100;
+		new_freq = pcpu->policy->max * cpu_load / 100;
 	}
 
 	if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,