Re: [PATCH V3 4/7] workqueue: Loop over in rescuer until all its work is done
From: Tejun Heo
Date: Fri Nov 21 2025 - 14:30:28 EST
On Fri, Nov 21, 2025 at 10:57:17PM +0800, Lai Jiangshan wrote:
> From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>
>
> Simplify the rescuer work by looping directly in the rescuer rather than
> adding the pwq back to the maydays list. This also helps when
> max_requests is 1 or small but pwq->inactive_works has a large number of
> pending work items.
>
> This might hurt fairness among PWQs and the rescuer could end up being
> stuck on one PWQ indefinitely, but the rescuer's objective is to make
> forward progress rather than ensure fairness.
>
> Fairness can be further improved in future by assigning work items to
> the rescuer one by one.
Yeah, given that you restore similar behavior later. I'd just note that this
is temporary change to ease the transition.
Thanks.
--
tejun