lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_1EnkPiBKakGYtM@slm.duckdns.org>
Date: Mon, 14 Apr 2025 07:23:42 -1000
From: Tejun Heo <tj@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: 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>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Trevor Gross <tmgross@...ch.edu>,
	Danilo Krummrich <dakr@...nel.org>,
	Daniel Almeida <daniel.almeida@...labora.com>,
	Tamir Duberstein <tamird@...il.com>, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] workqueue: rust: add creation of workqueues

Hello,

On Fri, Apr 11, 2025 at 03:34:24PM +0000, Alice Ryhl wrote:
> Creating workqueues is needed by various GPU drivers. Not only does it
> give you better control over execution, it also allows devices to ensure
> that all tasks have exited before the device is unbound (or similar) by
> running the workqueue destructor.
> 
> This patch is being developed in parallel with the new Owned type [1].
> The OwnedQueue struct becomes redundant once [1] lands; at that point it
> can be replaced with Owned<Queue>, and constructors can be moved to the
> Queue type.
> 
> A wrapper type WqFlags is provided for workqueue flags. Since we only
> provide the | operator for this wrapper type, this makes it impossible
> to pass internal workqueue flags to the workqueue constructor. It has
> the consequence that we need a separate constant for the no-flags case,
> as the constructor does not accept a literal 0. I named this constant
> "BOUND" to signify the opposite of UNBOUND.

Maybe name it NONE or DUMMY? Doesn't affect this patch but [UN]BOUND are a
bit confusing and as a part of the effort to reduce unnecessary usage of
cpu-bound workqueues, there's a plan to flip the default and use PERCPU for
the cpu-bound workqueues.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ