Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7636b618 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: interactive: Ramp up directly if cpu_load exceeds 100"

parents b368c67c f2f389df
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ static u64 update_load(int cpu)
	return now;
}

#define MAX_LOCAL_LOAD 100
static void cpufreq_interactive_timer(unsigned long data)
{
	u64 now;
@@ -455,7 +456,8 @@ static void cpufreq_interactive_timer(unsigned long data)
	tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime;

	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;
		} else {
			new_freq = choose_freq(pcpu, loadadjfreq);
@@ -467,7 +469,8 @@ static void cpufreq_interactive_timer(unsigned long data)
		new_freq = choose_freq(pcpu, loadadjfreq);
	}

	if (pcpu->policy->cur >= tunables->hispeed_freq &&
	if (cpu_load <= MAX_LOCAL_LOAD &&
	    pcpu->policy->cur >= tunables->hispeed_freq &&
	    new_freq > pcpu->policy->cur &&
	    now - pcpu->hispeed_validate_time <
	    freq_to_above_hispeed_delay(tunables, pcpu->policy->cur)) {