[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAofZF6jcCAdDjRp-7w7+_ZgOG4k3apxbSiKvGoUDVf5hw0GhA@mail.gmail.com>
Date: Tue, 3 Feb 2026 09:41:07 +0100
From: Marco Crivellari <marco.crivellari@...e.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Tejun Heo <tj@...nel.org>, Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org, Lai Jiangshan <jiangshanlai@...il.com>,
Frederic Weisbecker <frederic@...nel.org>, Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Michal Hocko <mhocko@...e.com>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>
Subject: Re: [PATCH v3 2/2] rust: add system_percpu() around the new system_percpu_wq
On Mon, Jan 12, 2026 at 5:23 PM Alice Ryhl <aliceryhl@...gle.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?
Thanks!
--
Marco Crivellari
L3 Support Engineer
Powered by blists - more mailing lists