irq_work: CPU-hotplug improvements on PREEMPT_RT
Status from this message: The following commit has been merged into the sched/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | irq_work: Update a comment regarding CPU hotplug invocationkernel/ | +1 | 0 replies | |
| 2/3 | irq_work: Flush lazy work CPU down on PREEMPT_RTinclude/ kernel/ kernel/ | +14 | 1 reply | |
| 3/3 | smpboot: Don't park the thread if work is pendingkernel/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] irq_work: CPU-hotplug improvements on PREEMPT_RT
There was an unrelated thread which made me look into how !IRQ_WORK_HARD_IRQ is processed on PREEMPT_RT. Turns out the queue of callbacks gets never flushed on CPU shutdown. !PREEMPT_RT has a flush but on PREEMPT_RT the thread context is required.
This almost never happens but if it happens it is a pain.
A small fix is for the smpboot thread to invoke the thread-function before parking. This is an improvement. There is still a small window if callbacks are added after the irq_work thread has been shutdown. As a fix I added an explicit flush on the control CPU once the CPU is dead.
From what I've seen there are two users that don't behave as expected if invoked from the "wrong" CPU:
- cgrp_dead_tasks_iwork()
This shouldn't be a problem because no task terminates after the smpboot thread parked. Everythng that was queued up before will be flushed during parking.
Regardless posted
https://lore.kernel.org/all/[email protected]/
- wake_up_klogd_work()
This will not cause data curruption but console printing will be delayed until the following printk. Not pretty, posted
https://lore.kernel.org/all/[email protected]/
Sebastian Andrzej Siewior (3):
irq_work: Update a comment regarding CPU hotplug invocation
irq_work: Flush lazy work CPU down on PREEMPT_RT
smpboot: Don't park the thread if work is pending
include/linux/irq_work.h | 2 ++ kernel/irq_work.c | 16 ++++++++++++---- kernel/smp.c | 1 + kernel/smpboot.c | 6 ++++-- 4 files changed, 19 insertions(+), 6 deletions(-)
Signature · 1 line
2.55.0