diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2024-03-19 02:07:29 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-03-19 12:14:55 +0300 |
commit | 03877039863be021a19fda307136657bb6d61f75 (patch) | |
tree | f1d3a99a7b2e63539577bc6e200a870403a7a224 /Documentation | |
parent | f55acb1e44f3d4bf1ca7926d777895a67d4ec606 (diff) | |
download | linux-03877039863be021a19fda307136657bb6d61f75.tar.xz |
timers: Fix removed self-IPI on global timer's enqueue in nohz_full
While running in nohz_full mode, a task may enqueue a timer while the
tick is stopped. However the only places where the timer wheel,
alongside the timer migration machinery's decision, may reprogram the
next event accordingly with that new timer's expiry are the idle loop or
any IRQ tail.
However neither the idle task nor an interrupt may run on the CPU if it
resumes busy work in userspace for a long while in full dynticks mode.
To solve this, the timer enqueue path raises a self-IPI that will
re-evaluate the timer wheel on its IRQ tail. This asynchronous solution
avoids potential locking inversion.
This is supposed to happen both for local and global timers but commit:
b2cf7507e186 ("timers: Always queue timers on the local CPU")
broke the global timers case with removing the ->is_idle field handling
for the global base. As a result, global timers enqueue may go unnoticed
in nohz_full.
Fix this with restoring the idle tracking of the global timer's base,
allowing self-IPIs again on enqueue time.
Fixes: b2cf7507e186 ("timers: Always queue timers on the local CPU")
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240318230729.15497-3-frederic@kernel.org
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions