[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DB9A8OPZK3DZ.YVQPQQSD12MU@kernel.org>
Date: Fri, 11 Jul 2025 16:07:04 +0200
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Alice Ryhl" <aliceryhl@...gle.com>
Cc: "Tejun Heo" <tj@...nel.org>, "Miguel Ojeda" <ojeda@...nel.org>, "Lai
Jiangshan" <jiangshanlai@...il.com>, "Boqun Feng" <boqun.feng@...il.com>,
"Gary Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Andreas Hindborg" <a.hindborg@...nel.org>,
"Trevor Gross" <tmgross@...ch.edu>, "Daniel Almeida"
<daniel.almeida@...labora.com>, "Tamir Duberstein" <tamird@...il.com>,
<rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Benno
Lossin" <lossin@...nel.org>
Subject: Re: [PATCH v3] workqueue: rust: add delayed work items
Hi Alice,
On Fri Jul 11, 2025 at 9:59 AM CEST, Alice Ryhl wrote:
> This patch is being sent for use in the various Rust GPU drivers that
> are under development. It provides the additional feature of work items
> that are executed after a delay.
I thought I commented on this in a previous version already, but apparently I
haven't (was it a different thread maybe?).
For drivers, we should also support 'scoped' work items and worqueues, where
'scoped' means limit the lifetime to the driver being bound to a device.
For better understanding, in C one would call this devm_alloc_workqueue(), which
would guarantee that the workqueue is terminated on device unbind. Similar for
individual work items on shared workqueues (such as the system ones), which
would be canceled synchronously on driver unbind.
This is very useful for drivers, since it allows to provide a &Device<Bound>
within the work's callback, which allows drivers to access device resources
safely and directly without additional overhead.
Powered by blists - more mailing lists