From: lyude@redhat.com
To: Gary Guo <gary@garyguo.net>, Peter Zijlstra <peterz@infradead.org>
Cc: "Boqun Feng" <boqun@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
"Waiman Long" <longman@redhat.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] rust: sync: create lock class using `#[track_caller]`
Date: Tue, 07 Jul 2026 17:05:33 -0400 [thread overview]
Message-ID: <232b31667248cf58b1365aba58573494f81b21b8.camel@redhat.com> (raw)
In-Reply-To: <DJPZ3RKZWJZS.1EOKOZA3WE6GZ@garyguo.net>
On Sat, 2026-07-04 at 18:46 +0100, Gary Guo wrote:
>
> It's certainly possible to give explicit names (this is what patch
> 1/2's
> "new_with_name" function is for). To mandate names being provided we
> just need
> to remove the constructor function without the name. That said, I am
> not sure
> that we want everyone to explicitly give names. Especially for types
> like
> delayed_work where it needs two lock classes and names, it's somewhat
> leaky abstraction if the constructor asks to user to provide a name
> for its
> work completion and a name for its timer (as it's not possible to
> concat strings
> without allocation without using macros).
>
I think it's also worth mentioning too: this doesn't really make that
much of a difference compared to how lockdep names are currently
generated in the upstream kernel with Rust. If anything, this sort of
change would make it a lot easier to actually improve the auto-
generated names we come up with in the future.
> Best,
> Gary
prev parent reply other threads:[~2026-07-07 21:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 13:47 [PATCH RFC 0/2] rust: sync: create lock class using `#[track_caller]` Gary Guo
2026-07-03 13:47 ` [PATCH RFC 1/2] rust: sync: introduce a way to create lock class from caller Gary Guo
[not found] ` <20260703140125.0E9F71F000E9@smtp.kernel.org>
2026-07-03 14:32 ` Gary Guo
2026-07-07 21:25 ` lyude
2026-07-03 13:47 ` [PATCH RFC 2/2] lockdep: delegate Rust lock class printing to Rust code Gary Guo
2026-07-07 21:24 ` lyude
2026-07-03 14:01 ` [PATCH RFC 0/2] rust: sync: create lock class using `#[track_caller]` Peter Zijlstra
2026-07-03 14:24 ` Gary Guo
2026-07-03 22:32 ` Peter Zijlstra
2026-07-04 16:52 ` Gary Guo
2026-07-04 17:10 ` Peter Zijlstra
2026-07-04 17:46 ` Gary Guo
2026-07-07 21:05 ` lyude [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=232b31667248cf58b1365aba58573494f81b21b8.camel@redhat.com \
--to=lyude@redhat.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=lossin@kernel.org \
--cc=mingo@redhat.com \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=will@kernel.org \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox