Re: [PATCH] workqueue: add workqueue.mayday_initial_timeout

From: Tejun Heo

Date: Tue Nov 11 2025 - 15:40:38 EST


Hello,

On Tue, Nov 11, 2025 at 10:52:44AM +0800, ying chen wrote:
> If creating a new worker takes longer than MAYDAY_INITIAL_TIMEOUT,
> the rescuer thread will be woken up to process works scheduled on
> @pool, resulting in sequential execution of all works. This may lead
> to a situation where one work blocks others. However, the initial
> rescue timeout defaults to 10 milliseconds, which can easily be
> triggered in heavy-load environments.

This is not how workqueue works. Rescuer doesn't exclude other workers. If
other workers become available, they will run the workqueue concurrently.
All that initial timeout achieves is delaying the initial execution from the
rescuer.

Is this from observing real behaviors? If so, what was the test case and how
did the behavior after the patch? It couldn't have gotten better.

Thanks.

--
tejun