Re: [PATCH] workqueue: rust: add creation of workqueues

From: Alice Ryhl
Date: Wed Apr 16 2025 - 16:13:16 EST


On Wed, Apr 16, 2025 at 10:10 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> On Wed, Apr 16, 2025 at 10:08:35PM +0200, Alice Ryhl wrote:
> ...
> > > This should be pretty cheap and we can probably enable this for everyone,
> > > but if the overhead is noticeable, this can be an optional behavior
> > > depending on a workqueue flag.
> >
> > My only concern is that we're executing work items *before* the
> > deadline they specified. There could be work items that assume this
> > doesn't happen? But maybe it's okay. Otherwise, what you suggest seems
> > reasonable enough to me.
>
> That's already what flush_delayed_work() does, so I don't think it'd be too
> surprising. Alternatively, we can go for canceling on draining/destruction
> but that'd be more surprising I think. As long as the behavior is documented
> clearly, I don't see problems with running and flushing them.

Sounds good. I'll go ahead and submit a patch for this.

Alice