Re: [PATCH] workqueue: add workqueue.mayday_initial_timeout

From: Lai Jiangshan

Date: Thu Nov 13 2025 - 10:50:14 EST


Hello.

On Thu, Nov 13, 2025 at 12:03 AM Tejun Heo <tj@xxxxxxxxxx> wrote:

>
>
> Ah, I see what you mean. The slurping is to avoid potentially O(N^2)
> scanning but that probably the wrong trade-off to make here. I think the
> right solution is making it break out after finding the first matching work
> item and loop outside so that it processes work item one by one.
>

I'm implementing it. A positional dummy work item is added to mark the
position for the next scan after processing the previous one.

I’ll send it soon.

Still, I suggest that the workqueue user eliminate any dependencies among
the work items when using a rescuer. If the memory pressure is not relieved
and no normal workers come to help, it simply won’t work.


thanks
Lai