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 V3:
check memory pressure
update comments
rename @limited to @throttled
v3: https://lore.kernel.org/lkml/20251121145720.342467-1-jiangshanlai@gmail.com/
Lai Jiangshan (4):
workqueue: Loop over in rescuer until all its work is done
workqueue: Process rescuer work items one-by-one using a cursor
workqueue: Limit number of processed works in rescuer per turn
workqueue: Process extra works in rescuer when there are no more to
rescue
kernel/workqueue.c | 141 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 108 insertions(+), 33 deletions(-)
--
2.19.1.6.gb485710b