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

Commit 7a14ce1d authored by Ingo Molnar's avatar Ingo Molnar
Browse files

nohz: reduce jiffies polling overhead



Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 916941b2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -48,6 +48,13 @@ static void tick_do_update_jiffies64(ktime_t now)
	unsigned long ticks = 0;
	ktime_t delta;

	/*
	 * Do a quick check without holding xtime_lock:
	 */
	delta = ktime_sub(now, last_jiffies_update);
	if (delta.tv64 < tick_period.tv64)
		return;

	/* Reevalute with xtime_lock held */
	write_seqlock(&xtime_lock);