]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tick: Detect and fix jiffies update stall
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 2 Feb 2022 00:01:07 +0000 (01:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:23:17 +0000 (16:23 +0200)
commitae4f109b954d0ac0130b2934da7d79b950d5f5b7
tree0ef313ab1878fa210176c4bfdda7c5c04cbcf528
parentc7e91047d345e50a7f9651b409a51c88b6de0037
tick: Detect and fix jiffies update stall

commit a1ff03cd6fb9c501fff63a4a2bface9adcfa81cd upstream.

On some rare cases, the timekeeper CPU may be delaying its jiffies
update duty for a while. Known causes include:

* The timekeeper is waiting on stop_machine in a MULTI_STOP_DISABLE_IRQ
  or MULTI_STOP_RUN state. Disabled interrupts prevent from timekeeping
  updates while waiting for the target CPU to complete its
  stop_machine() callback.

* The timekeeper vcpu has VMEXIT'ed for a long while due to some overload
  on the host.

Detect and fix these situations with emergency timekeeping catchups.

Original-patch-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/tick-sched.c
kernel/time/tick-sched.h