]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tick: Detect and fix jiffies update stall
authorFrederic Weisbecker <frederic@kernel.org>
Sun, 13 Aug 2023 03:16:18 +0000 (03:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:22:04 +0000 (18:22 +0200)
commitc3b954a51b6447d060c1b30ec4efb5db34a056f7
treee0f2abf6da64768c1955d87141ddec46a7b7b123
parentaf99918f0e39aeb14d2cd08ca79faf9ccb1ec47f
tick: Detect and fix jiffies update stall

[ Upstream commit a1ff03cd6fb9c501fff63a4a2bface9adcfa81cd ]

tick: Detect and fix jiffies update stall

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