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

Commit 9aa44be6 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: interactive: Reset last evaluated jiffy in idle callback



When CPU has been busy for a long time, last evaluated jiffy will be
quite behind because the timer would have been canceled. We don't want
to schedule a timer to fire in the past as load will always be 100%.

Reset last evaluated jiffy so that timer will be scheduled for the
next window.

Change-Id: Ie25e65eab1f16acdeda267987ca605d653f1f32a
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 54952983
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -502,9 +502,11 @@ static void cpufreq_interactive_idle_start(void)
		 * min indefinitely.  This should probably be a quirk of
		 * min indefinitely.  This should probably be a quirk of
		 * the CPUFreq driver.
		 * the CPUFreq driver.
		 */
		 */
		if (!pending)
		if (!pending) {
			pcpu->last_evaluated_jiffy = get_jiffies_64();
			cpufreq_interactive_timer_resched(pcpu);
			cpufreq_interactive_timer_resched(pcpu);
		}
		}
	}


	up_read(&pcpu->enable_sem);
	up_read(&pcpu->enable_sem);
}
}