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

Commit 1e2a7521 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: Use target_freq for load calculation"

parents 60446f5b 2cbc010c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -486,11 +486,11 @@ static void __cpufreq_interactive_timer(unsigned long data, bool is_notif)
	}

	spin_lock_irqsave(&ppol->target_freq_lock, flags);
	cpu_load = loadadjfreq / ppol->policy->cur;
	cpu_load = loadadjfreq / ppol->target_freq;
	tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime;

	if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) {
		if (ppol->policy->cur < tunables->hispeed_freq &&
		if (ppol->target_freq < tunables->hispeed_freq &&
		    (!tunables->fast_ramp_up || cpu_load <= MAX_LOCAL_LOAD)) {
			new_freq = tunables->hispeed_freq;
		} else {
@@ -507,10 +507,10 @@ static void __cpufreq_interactive_timer(unsigned long data, bool is_notif)
	}

	if ((!tunables->fast_ramp_up || cpu_load <= MAX_LOCAL_LOAD) &&
	    ppol->policy->cur >= tunables->hispeed_freq &&
	    new_freq > ppol->policy->cur &&
	    ppol->target_freq >= tunables->hispeed_freq &&
	    new_freq > ppol->target_freq &&
	    now - ppol->hispeed_validate_time <
	    freq_to_above_hispeed_delay(tunables, ppol->policy->cur)) {
	    freq_to_above_hispeed_delay(tunables, ppol->target_freq)) {
		trace_cpufreq_interactive_notyet(
			max_cpu, cpu_load, ppol->target_freq,
			ppol->policy->cur, new_freq);