cpufreq: interactive: apply above_hispeed_delay to each step above hispeed
Apply above_hispeed_delay whenever increasing speed to a new speed above hispeed (not just the first step above hispeed). Change-Id: Ibb7add7db47f2a4306a9458c4e1ebabb60698636 Signed-off-by: Todd Poynor <toddpoynor@google.com>
This commit is contained in:
parent
4727e1aa45
commit
e337153485
1 changed files with 13 additions and 23 deletions
|
@ -176,31 +176,21 @@ static void cpufreq_interactive_timer(unsigned long data)
|
||||||
if (load_since_change > cpu_load)
|
if (load_since_change > cpu_load)
|
||||||
cpu_load = load_since_change;
|
cpu_load = load_since_change;
|
||||||
|
|
||||||
if (cpu_load >= go_hispeed_load || boost_val) {
|
if ((cpu_load >= go_hispeed_load || boost_val) &&
|
||||||
if (pcpu->target_freq < hispeed_freq &&
|
pcpu->target_freq < hispeed_freq)
|
||||||
hispeed_freq < pcpu->policy->max) {
|
|
||||||
new_freq = hispeed_freq;
|
new_freq = hispeed_freq;
|
||||||
} else {
|
else
|
||||||
new_freq = pcpu->policy->cur * cpu_load / target_load;
|
new_freq = pcpu->policy->cur * cpu_load / target_load;
|
||||||
|
|
||||||
if (new_freq < hispeed_freq)
|
if (pcpu->target_freq >= hispeed_freq &&
|
||||||
new_freq = hispeed_freq;
|
new_freq > pcpu->target_freq &&
|
||||||
|
now - pcpu->hispeed_validate_time < above_hispeed_delay_val) {
|
||||||
if (pcpu->target_freq == hispeed_freq &&
|
|
||||||
new_freq > hispeed_freq &&
|
|
||||||
now - pcpu->hispeed_validate_time
|
|
||||||
< above_hispeed_delay_val) {
|
|
||||||
trace_cpufreq_interactive_notyet(
|
trace_cpufreq_interactive_notyet(
|
||||||
data, cpu_load, pcpu->target_freq,
|
data, cpu_load, pcpu->target_freq,
|
||||||
pcpu->policy->cur, new_freq);
|
pcpu->policy->cur, new_freq);
|
||||||
goto rearm;
|
goto rearm;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
|
||||||
new_freq = pcpu->policy->cur * cpu_load / target_load;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (new_freq <= hispeed_freq)
|
|
||||||
pcpu->hispeed_validate_time = now;
|
pcpu->hispeed_validate_time = now;
|
||||||
|
|
||||||
if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,
|
if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,
|
||||||
|
|
Loading…
Add table
Reference in a new issue