From: Tejun Heo <tj@kernel.org>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Marco Crivellari <marco.crivellari@suse.com>,
Breno Leitao <leitao@debian.org>,
linux-kernel@vger.kernel.org,
Lai Jiangshan <jiangshanlai@gmail.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Michal Hocko <mhocko@suse.com>
Subject: Re: [RFC PATCH 0/2] Add queue_*() functions and prefer per-cpu workqueue and flag
Date: Wed, 8 Jul 2026 06:29:41 -1000 [thread overview]
Message-ID: <ak569WYSm3ygKl1-@slm.duckdns.org> (raw)
In-Reply-To: <ak5Xom7Nmb1pDDgw@localhost.localdomain>
On Wed, Jul 08, 2026 at 03:58:58PM +0200, Frederic Weisbecker wrote:
> Le Wed, Jun 24, 2026 at 09:46:55AM -1000, Tejun Heo a écrit :
> > Hello,
> >
> > On Tue, Jun 23, 2026 at 05:13:31PM +0200, Marco Crivellari wrote:
> > > > - 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.
> > >
> > > You mentioned here "at boot time". What about making this also dynamic,
> > > "moving" the WQs with WQ_PREFER_PERCPU away from CPU N when N is
> > > isolated through a cgroup isolated partition?
> >
> > Yeah, being dynamic is better but switching dynamically between percpu and
> > unbound workqueues feels like it's going to be complicated. I can't think of
> > a simple way to do that. If you can, please be my guest.
>
> I fear it's necessary to have dynamic isolation working correctly.
> One way could be to make wq::cpu_pwq point to a pair of pwqs. One
> for the isolated -> unbound configuration and another one for the
> non_isolated -> per_cpu configuration.
So, if we really want this, I think a better way to go about it is probably
going deeper with the restructuring and just merge percpu and unbound
workqueues. Unbound workqueues already have the ability to update pwqs (or
rather install new ones and drain old ones), which is how attribute changes
are implemented. If we make the pwqs be able to point to both unbound and
percpu pools, the dynamic switch falls out naturally and percpu just becomes
one of the affinity settings. Luckily, recent developmenets on unbound
workqueue side already brought it pretty close to percpu already, so
hopefully it may not be *that* complicated.
Thanks.
--
tejun
prev parent reply other threads:[~2026-07-08 16:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 16:16 Marco Crivellari
2026-05-05 16:16 ` [RFC PATCH 1/2] workqueue: Add queue_*() functions, future schedule_*() replacement Marco Crivellari
2026-05-05 16:16 ` [RFC PATCH 2/2] workqueue: Add WQ_PREFER_PERCPU and system_prefer_percpu_wq Marco Crivellari
2026-05-05 20:18 ` [RFC PATCH 0/2] Add queue_*() functions and prefer per-cpu workqueue and flag Tejun Heo
2026-05-06 13:40 ` Breno Leitao
2026-05-07 10:25 ` Marco Crivellari
2026-05-07 21:27 ` Tejun Heo
2026-05-08 12:09 ` Frederic Weisbecker
2026-05-08 15:11 ` Tejun Heo
2026-05-12 8:52 ` Marco Crivellari
2026-06-23 15:13 ` Marco Crivellari
2026-06-24 19:46 ` Tejun Heo
2026-07-08 13:58 ` Frederic Weisbecker
2026-07-08 16:29 ` Tejun Heo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ak569WYSm3ygKl1-@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®