EXP tick: Detect and fix jiffies update stall
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 2 Feb 2022 00:01:07 +0000 (01:01 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 24 Feb 2022 17:56:43 +0000 (09:56 -0800)
commit8eb954756a8d2c59a6e619eb18a4a51eed17a223
tree0b1e629aae8ee618435f2d4870823b6af4957e3b
parent5b51d7486c3eae551e2f8e550ab31f51c60998bb
EXP 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: Paul E. McKenney <paulmck@kernel.org>
kernel/time/tick-sched.c
kernel/time/tick-sched.h