Re: [RFC PATCH 0/2] Add queue_*() functions and prefer per-cpu workqueue and flag
From: Marco Crivellari
Date: Tue May 12 2026 - 04:59:59 EST
Hello,
On Thu, May 7, 2026 at 11:27 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> Hello,
>
> On Thu, May 07, 2026 at 12:25:30PM +0200, Marco Crivellari wrote:
> > So, either we're going to have an "unbound" version or we use
> > queue_work() directly that sounds good to me. I guess retire - in
> > future - schedule_work[_on]() would be cleaner: so that users must
> > also specify the workqueue they really need to use.
>
> Yeah, retiring would be my preference if we need to update them anyway. I
> don't think the thin wrappers add anything useful.
Fine, this sounds good for me if we do it that way.
> WQ_AFFN_CPU is more flexible as the tasks aren't pinned to the CPU but there
> may be downsides:
>
> - Concurrency management isn't available.
>
> - Would create more kworkers.
>
> Maybe the original plan can be adapted to:
>
> - Add WQ_PERFER_PERCPU as discussed before.
>
> - At boot time, allow selecting whether to back them with percpu wqs or
> WQ_AFFN_X unbound ones. Maybe we can even experiment with default to
> WQ_AFFN_CPU.
Cool, maybe I will ask something else when the time comes!
Thanks!
--
Marco Crivellari
SUSE Labs