Re: [PATCH for 6.5] workqueue: Warn attempt to flush system-wide workqueues.

From: Tejun Heo
Date: Mon Jul 10 2023 - 16:40:48 EST


On Fri, Jun 30, 2023 at 09:28:53PM +0900, Tetsuo Handa wrote:
> Based on commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using
> a macro"), all in-tree users stopped flushing system-wide workqueues.
> Therefore, start emitting runtime message so that all out-of-tree users
> will understand that they need to update their code.
>
> Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>

Applied to wq/for-6.6.

> After this patch, flush_workqueue(wq) where wq cannot be determined at build
> time will not get runtime warning. Should we now start checking wq at run time
> so that we get runtime warning when wq is system-wide?

Yeah, we can add an internal flag for these standard workqueues and trigger
warning when somebody tries to flush them.

Thanks.

--
tejun