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

Commit 03eb3f1f authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: interactive_pro: 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: I4c3838f36bf4d1e4cebce29a26b45611b416d929
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 0c0e0da6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -555,9 +555,11 @@ static void cpufreq_interactive_idle_start(void)
		 * min indefinitely.  This should probably be a quirk of
		 * the CPUFreq driver.
		 */
		if (!pending)
		if (!pending) {
			pcpu->last_evaluated_jiffy = get_jiffies_64();
			cpufreq_interactive_timer_resched(smp_processor_id());
		}
	}

	up_read(&pcpu->enable_sem);
}