Re: [RFC PATCH v2 1/2] workqueue: Add warnings and fallback if system_{unbound}_wq is used
From: Marco Crivellari
Date: Thu May 28 2026 - 04:52:13 EST
Hello,
On Wed, May 27, 2026 at 8:32 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
> [...]
> > + /*
> > + * NOTE: These checks are here to assure that no users will still
> > + * rely on system_wq and system_unbound_wq.
> > + * They can be removed along with those workqueue when the
> > + * time comes.
> > + */
> > + if (unlikely(wq == system_wq)) {
>
> Can you add an internal flag to mark the workqueues and use a helper so that
> the warning messages aren't replicated in multiple places? Also, do we need
> to have the warning on delayed_queue? Just put it in a single spot where
> they'll all converge.
Yes, that sounds better indeed. So I can place the warnings directly
inside __queue_work(), calling an inline function?
Regarding the internal flags I guess you mean something like
__WQ_DEPRECATED and use this flag instead of the pointer to perform
the check.
Thanks!
--
Marco Crivellari
SUSE Labs