From: Tejun Heo <tj@kernel.org>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: linux-kernel@vger.kernel.org,
Lai Jiangshan <jiangshanlai@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH v2 0/4] Workqueue: rename system workqueue and add WQ_PERCPU
Date: Mon, 9 Jun 2025 08:59:17 -1000 [thread overview]
Message-ID: <aEcvBadg_rT2_roQ@slm.duckdns.org> (raw)
In-Reply-To: <20250609103535.780069-1-marco.crivellari@suse.com>
Hello, Marco.
On Mon, Jun 09, 2025 at 12:35:31PM +0200, Marco Crivellari wrote:
> === Introduced Changes by this patchset ===
>
> 1) [P 1-2] system workqueue rename:
>
> system_wq is a per-CPU workqueue, but his name is not clear.
> system_unbound_wq is to be used when locality is not required.
>
> Because of that, system_wq has been renamed in system_percpu_wq,
> while system_unbound_wq is now system_dfl_wq.
>
> The old wq are still around, but if used in queue_work(), a pr_warn_once()
> will be printed and the wq used is automatically assigned to the new
> default (system_dfl_wq or system_percpu_wq).
>
> 2) [P 3] Introduction of WQ_PERCPU.
>
> This patch adds the new WQ_PERCPU flag to explicitly require to be per-cpu.
>
> Every alloc_workqueue() caller should use one among WQ_PERCPU or
> WQ_UNBOUND. This is actually enforced warning if both or none of them
> are present at the same time.
>
> WQ_UNBOUND will be removed in a next release cycle.
>
> Because of that, this patch also adds to every alloc_workqueue() caller
> that require it, the new WQ_PERCPU flag.
>
> 3) [P 4] WQ_PERCPU documented in workqueue.rst
>
> Added a short section about WQ_PERCPU and a Note under WQ_UNBOUND
> mentioning that it will be removed in the future.
Thanks for working on this and the changes generally make sense to me.
However, I think we should try a bit harder to reduce friction with the
affected subsystems. It's a bit unfortunate that we're already at rc1. It
would have been better if the new flags and wq were introduced before rc1.
Oh well, we can manage. How about something like this?
- Separate out patches to add the new flag and wq. Don't add the warnings
yet. I'll commit these patches to a separate wq branch.
- Split out patches by subsystems. I know this is tedious but think it'd
still be worth doing. It doesn't have to be completely granular. e.g. We
know that network changes go through a single tree, so all network changes
can be in a single patch. Each patch can explain the workqueue changes and
that the patch can be either routed through the subysstem which would
require pulling from the above wq branch, or, as the default option, we'd
be happy to route the patch through the workqueue tree. I can create a
separate branch to collect the conversion patches that can go through wq
tree.
- After the next rc1 drops, I can apply the patches to add warnings to the
-fixes branch and then send them to Linus.
This is a bit more work but would likely produce less friction without
delaying the timeline significantly.
Thanks.
--
tejun
next prev parent reply other threads:[~2025-06-09 18:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 10:35 [PATCH v2 0/4] Workqueue: rename system workqueue and add WQ_PERCPU Marco Crivellari
2025-06-09 10:35 ` [PATCH v2 1/4] Workqueue: add system_percpu_wq Marco Crivellari
2025-06-09 10:35 ` [PATCH v2 2/4] Workqueue: add system_dfl_wq Marco Crivellari
2025-06-10 3:04 ` Lai Jiangshan
2025-06-10 8:56 ` Marco Crivellari
2025-06-10 21:44 ` Tejun Heo
2025-06-09 10:35 ` [PATCH v2 3/4] Workqueue: add WQ_PERCPU Marco Crivellari
2025-06-10 2:07 ` kernel test robot
2025-06-09 10:35 ` [PATCH v2 4/4] [Doc] " Marco Crivellari
2025-06-09 18:59 ` Tejun Heo [this message]
2025-06-10 8:34 ` [PATCH v2 0/4] Workqueue: rename system workqueue and " Marco Crivellari
2025-06-10 21:38 ` Tejun Heo
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=aEcvBadg_rT2_roQ@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).