Re: [RFC PATCH v2 1/2] workqueue: Add warnings and fallback if system_{unbound}_wq is used
From: Tejun Heo
Date: Thu May 28 2026 - 10:36:18 EST
Hello,
On Thu, May 28, 2026 at 10:45:23AM +0200, Marco Crivellari wrote:
> 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?
If it's just a single palce, open-coding it should be fine too.
Thanks.
--
tejun