Re: [PATCH] workqueue: Always queue work items to the newest PWQ for order workqueues

From: Tejun Heo
Date: Wed Jul 03 2024 - 13:40:17 EST


On Wed, Jul 03, 2024 at 05:27:41PM +0800, Lai Jiangshan wrote:
> From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>
>
> To ensure non-reentrancy, __queue_work() attempts to enqueue a work
> item to the pool of the currently executing worker. This is not only
> unnecessary for an ordered workqueue, where order inherently suggests
> non-reentrancy, but it could also disrupt the sequence if the item is
> not enqueued on the newest PWQ.
>
> Just queue it to the newest PWQ and let order management guarantees
> non-reentrancy.
>
> Fixes: 4c065dbce1e8("workqueue: Enable unbound cpumask update on ordered workqueues")
> Signed-off-by: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>

Applied to wq/for-6.10-fixes w/ stable cc added.

Thanks.

--
tejun