hrtimers: Push pending hrtimers away from outgoing CPU earlier
2b8272ff ("cpu/hotplug: Prevent self deadlock on CPU hot-unplug") solved the straight forward CPU hotplug deadlock vs. the scheduler bandwidth timer. Yu discovered a more involved variant where a task which has a bandwidth timer started on the outgoing CPU holds a lock and then gets throttled. If the lock required by one of the CPU hotplug callbacks the hotplug operation deadlocks because the unthrottling timer event is not handled on the dying CPU and can only be recovered once the control CPU reaches the hotplug state which pulls the pending hrtimers from the dead CPU. Solve this by pushing the hrtimers away from the dying CPU in the dying callbacks. Nothing can queue a hrtimer on the dying CPU at that point because all other CPUs spin in stop_machine() with interrupts disabled and once the operation is finished the CPU is marked offline. Reported-by: Yu Liao <liaoyu15@huawei.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Liu Tie <liutie4@huawei.com> Link: https://lore.kernel.org/r/87a5rphara.ffs@tglx
parent
ffc25326
-
mentioned in commit 9a2fc41a
-
mentioned in commit 7f4c8940
-
mentioned in commit 54d0d83a
-
mentioned in commit e787644c
-
mentioned in commit 3cb9871f
-
mentioned in commit c817f5c0
-
mentioned in commit a94d303b
-
mentioned in commit 4abccba2
-
mentioned in commit 6424f6eb
-
mentioned in commit 1aa4f696
-
mentioned in commit b1f576be
-
mentioned in commit a012efe0
Please register or sign in to comment