[PATCH 0/7] workqueue OwnedQueue, ScopedQueue and ScopedWork
Danilo Krummrich <[email protected]> Tue, 4 Aug 2026 21:52:02 +0200
| Newsgroups | org.kernel.vger.rust-for-linux,dev.linux.lists.driver-core,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This series extends the Rust workqueue bindings with the ability to create
custom workqueues, enqueue non-'static work items on scoped queues, and
introduces ScopedWork, a work item type that cancels synchronously on drop,
allowing drivers to use workqueues with lifetime-bound data.
This picks up and extends prior work from Alice [1] and Onur [2]; changes I
subsequently applied, if any, are documented in the corresponding patch.
I also added a patch to replace the deprecated system_wq with
system_{percpu,dfl}_wq, which I originally sent with the WaitQueue series [3],
as it makes a bit more sense in this context.
[1] https://lore.kernel.org/all/[email protected]
[2] https://lore.kernel.org/all/[email protected]
[3] https://lore.kernel.org/all/[email protected]
Alice Ryhl (3):
rust: workqueue: restrict delayed work to global wqs
rust: workqueue: create workqueue subdirectory
rust: workqueue: add creation of workqueues
Danilo Krummrich (3):
rust: workqueue: replace deprecated system_wq with
system_{percpu,dfl}_wq
rust: workqueue: add Work::cancel_work_sync()
rust: workqueue: add ScopedWork for non-'static work items
Onur Özkan (1):
rust: workqueue: add ScopedQueue for lifetime bound items
MAINTAINERS | 1 +
drivers/android/binder/process.rs | 4 +-
rust/helpers/workqueue.c | 7 +
rust/kernel/sync/completion.rs | 2 +-
rust/kernel/workqueue/builder.rs | 389 ++++++++++++++++++
.../kernel/{workqueue.rs => workqueue/mod.rs} | 147 +++++--
rust/kernel/workqueue/scoped_queue.rs | 202 +++++++++
rust/kernel/workqueue/scoped_work.rs | 290 +++++++++++++
8 files changed, 1009 insertions(+), 33 deletions(-)
create mode 100644 rust/kernel/workqueue/builder.rs
rename rust/kernel/{workqueue.rs => workqueue/mod.rs} (90%)
create mode 100644 rust/kernel/workqueue/scoped_queue.rs
create mode 100644 rust/kernel/workqueue/scoped_work.rs
base-commit: f2687db25dd52319cb06ef4aa8cc2a13fa0203fa
--
2.55.0