From: Alice Ryhl <aliceryhl@google.com>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: Tejun Heo <tj@kernel.org>, Boqun Feng <boqun.feng@gmail.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
Lai Jiangshan <jiangshanlai@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Michal Hocko <mhocko@suse.com>, Miguel Ojeda <ojeda@kernel.org>,
Alex Gaynor <alex.gaynor@gmail.com>
Subject: Re: [PATCH v3 2/2] rust: add system_percpu() around the new system_percpu_wq
Date: Tue, 3 Feb 2026 10:19:49 +0000 [thread overview]
Message-ID: <aYHLxVwa6eBYMuZT@google.com> (raw)
In-Reply-To: <CAAofZF6jcCAdDjRp-7w7+_ZgOG4k3apxbSiKvGoUDVf5hw0GhA@mail.gmail.com>
On Tue, Feb 03, 2026 at 09:41:07AM +0100, Marco Crivellari wrote:
> On Mon, Jan 12, 2026 at 5:23 PM Alice Ryhl <aliceryhl@google.com> wrote:
> > [...]
> > > > Another approach is to add a new `enqueue_cpu` to the existing `Queue`
> > > > struct. In that case, all of these four combinations become legal:
> > > >
> > > > workqueue::system().enqueue(my_work_item)
> > > > workqueue::system().enqueue_cpu(my_work_item, cpu_id)
> > > > workqueue::system_percpu().enqueue(my_work_item)
> > > > workqueue::system_percpu().enqueue_cpu(my_work_item, cpu_id)
> > > >
> > > > which approach is best depends on whether you want all four combinations
> > > > to be legal or not.
>
> Hi Alice,
>
> I was starting yesterday evening when I realized the 2nd approach
> would be a better
> fit for the work we should do now. I also think in this series we
> should already convert
> the system() users to system_percpu() (same goes for system_unbound()
> => system_dfl()).
>
> Using the 2nd approach would just make the migration smooth because we can just
> rename all the users of those functions.
>
> I think it's better to migrate / convert to the new functions because
> they are using the new
> introduced workqueues. Sooner or later in the C code we are going to
> have warnings
> for users who are stuck on the older workqueues, so it's better to
> also migrate the Rust code
> on the newer version.
>
> In short: I would like to introduce only enqueue_cpu() so that it's
> just easier to do a 1:1 conversion
> without changing the behavior and in the meantime introduce these renames:
>
> system_unbound() => system_dfl()
> system() => system_percpu()
>
>
> What do you think?
I'm ok with the simpler approach.
Alice
next prev parent reply other threads:[~2026-02-03 10:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 15:15 [PATCH v3 0/2] rust: add new workqueue functions Marco Crivellari
2025-10-08 15:15 ` [PATCH v3 1/2] rust: add system_dfl() around the new system_dfl_wq Marco Crivellari
2025-10-08 15:15 ` [PATCH v3 2/2] rust: add system_percpu() around the new system_percpu_wq Marco Crivellari
2025-10-08 15:56 ` Boqun Feng
2025-10-09 11:17 ` Alice Ryhl
2026-01-09 16:32 ` Marco Crivellari
2026-01-12 9:05 ` Alice Ryhl
2026-01-12 16:10 ` Marco Crivellari
2026-01-12 16:22 ` Alice Ryhl
2026-01-26 15:45 ` Marco Crivellari
2026-02-03 8:41 ` Marco Crivellari
2026-02-03 10:19 ` Alice Ryhl [this message]
2025-10-08 16:20 ` Miguel Ojeda
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=aYHLxVwa6eBYMuZT@google.com \
--to=aliceryhl@google.com \
--cc=alex.gaynor@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tj@kernel.org \
/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