[PATCH V5 0/3] workqueue: Factor the way to assign rescuer work
From: Lai Jiangshan
Date: Mon Dec 08 2025 - 08:22:16 EST
From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>
Previously, the rescuer scanned for all matching work items at once and
processed them within a single rescuer thread, which could cause one
blocking work item to stall all others.
Make the rescuer process work items one-by-one instead of slurping all
matches in a single pass using a cursor.
Changed from V4:
Control the limit and call send_mayday() in rescuer_thread(), which
makes rescuer_thread() responsible for ensuring the cursor is not left
behind.
v4: https://lore.kernel.org/lkml/20251125063617.671199-1-jiangshanlai@xxxxxxxxx/
Lai Jiangshan (3):
workqueue: Refactor send_mayday() to take pwq directly
workqueue: Process rescuer work items one-by-one using a cursor
workqueue: Process extra works in rescuer on memory pressure
kernel/workqueue.c | 119 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 91 insertions(+), 28 deletions(-)
--
2.19.1.6.gb485710b