[PATCH V5 0/3] workqueue: Factor the way to assign rescuer work

Lai Jiangshan posted 3 patches 1 week ago
kernel/workqueue.c | 119 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 91 insertions(+), 28 deletions(-)
[PATCH V5 0/3] workqueue: Factor the way to assign rescuer work
Posted by Lai Jiangshan 1 week ago
From: Lai Jiangshan <jiangshan.ljs@antgroup.com>

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@gmail.com/

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
Re: [PATCH V5 0/3] workqueue: Factor the way to assign rescuer work
Posted by Tejun Heo 1 week ago
> 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

Applied 1-3 to wq/for-6.20 with minor typo fixes.

Thanks.

-- 
tejun