cpufreq: interactive: Ramp up directly if cpu_load exceeds 100
When governor is using regular busy time tracking, cpu_load will never exceed 100 because busy time will never exceed elapsed time in any one sampling window. The only exception is when frequency is reduced in middle of a window (e.g. due to thermal throttling). In this case, cpu_load is likely irrelevant since current frequency governor has been voting is already higher than what target can run at. However, on a heterogeneous CPU system with scheduler input enabled to track the load of migrated tasks, cpu_load could also exceed 100 when a task migrates from more capable CPU to slower CPU. When this happens, governor already knows the exact frequency required to handle this load. There is no need to progressively ramp up frequency in order to assess the load's real demand. It's not desirable to starve such a migrating task by forcing it through ramping up process on the slower CPU. Direclty jump beyond hispeed_freq and ignore above_hispeed_delay if cpu_load exceeds 100. Change-Id: Ib87057e4f00732fad943ab595a33e3059494ef15 Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
parent
ce5c462516
commit
82a0e1c81f
1 changed files with 5 additions and 2 deletions
|
@ -407,6 +407,7 @@ static u64 update_load(int cpu)
|
||||||
return now;
|
return now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MAX_LOCAL_LOAD 100
|
||||||
static void cpufreq_interactive_timer(unsigned long data)
|
static void cpufreq_interactive_timer(unsigned long data)
|
||||||
{
|
{
|
||||||
u64 now;
|
u64 now;
|
||||||
|
@ -474,7 +475,8 @@ static void cpufreq_interactive_timer(unsigned long data)
|
||||||
tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime;
|
tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime;
|
||||||
|
|
||||||
if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) {
|
if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) {
|
||||||
if (pcpu->policy->cur < tunables->hispeed_freq) {
|
if (pcpu->policy->cur < tunables->hispeed_freq &&
|
||||||
|
cpu_load <= MAX_LOCAL_LOAD) {
|
||||||
new_freq = tunables->hispeed_freq;
|
new_freq = tunables->hispeed_freq;
|
||||||
} else {
|
} else {
|
||||||
new_freq = choose_freq(pcpu, loadadjfreq);
|
new_freq = choose_freq(pcpu, loadadjfreq);
|
||||||
|
@ -489,7 +491,8 @@ static void cpufreq_interactive_timer(unsigned long data)
|
||||||
new_freq = tunables->hispeed_freq;
|
new_freq = tunables->hispeed_freq;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pcpu->policy->cur >= tunables->hispeed_freq &&
|
if (cpu_load <= MAX_LOCAL_LOAD &&
|
||||||
|
pcpu->policy->cur >= tunables->hispeed_freq &&
|
||||||
new_freq > pcpu->policy->cur &&
|
new_freq > pcpu->policy->cur &&
|
||||||
now - pcpu->pol_hispeed_val_time <
|
now - pcpu->pol_hispeed_val_time <
|
||||||
freq_to_above_hispeed_delay(tunables, pcpu->policy->cur)) {
|
freq_to_above_hispeed_delay(tunables, pcpu->policy->cur)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue