[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aL1lkN5WcWkwiq3S@google.com>
Date: Sun, 7 Sep 2025 10:59:28 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Marco Crivellari <marco.crivellari@...e.com>
Cc: linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
Tejun Heo <tj@...nel.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 0/2] rust: replace wq users and add WQ_PERCPU to
alloc_workqueue() users
On Fri, Sep 05, 2025 at 06:05:50PM +0200, Marco Crivellari wrote:
> Hello Alice,
>
> Thanks for your reply!
>
> I'm not entirely sure I understood your doubt.
>
> system_dfl_wq and system_percpu_wq are wq(s) also present in the C code.
> They are part of the prerequisite already merged in:
>
> 128ea9f6ccfb6960293ae4212f4f97165e42222d
> ("workqueue: Add system_percpu_wq and system_dfl_wq")
>
> Let me know if I haven't understood correctly what you meant.
>
> Thanks!
I mean that instead of:
+/// Returns the system unbound work queue (`system_dfl_wq`).
///
/// Workers are not bound to any specific CPU, not concurrency managed, and all queued work items
/// are executed immediately as long as `max_active` limit is not reached and resources are
/// available.
pub fn system_unbound() -> &'static Queue {
- // SAFETY: `system_unbound_wq` is a C global, always available.
- unsafe { Queue::from_raw(bindings::system_unbound_wq) }
+ // SAFETY: `system_dfl_wq` is a C global, always available.
+ unsafe { Queue::from_raw(bindings::system_dfl_wq) }
}
you add a new function:
pub fn system_dfl() -> &'static Queue {
// SAFETY: `system_dfl_wq` is a C global, always available.
unsafe { Queue::from_raw(bindings::system_dfl_wq) }
}
and do *not* modify system_unbound().
Alice
Powered by blists - more mailing lists