public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Lyude Paul <lyude@redhat.com>
Cc: rust-for-linux@vger.kernel.org,
	"Danilo Krummrich" <dakr@redhat.com>,
	airlied@redhat.com, "Ingo Molnar" <mingo@redhat.com>,
	"Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Martin Rodriguez Reboredo" <yakoyoku@gmail.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Valentin Obst" <kernel@valentinobst.de>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] rust: sync: Add IrqSpinLock
Date: Fri, 26 Jul 2024 22:26:10 +0200	[thread overview]
Message-ID: <20240726202610.GU26599@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <018a49c380568a817f57cfa47a3f7504d03519e9.camel@redhat.com>

On Fri, Jul 26, 2024 at 04:21:09PM -0400, Lyude Paul wrote:
> On Fri, 2024-07-26 at 09:48 +0200, Peter Zijlstra wrote:
> > On Thu, Jul 25, 2024 at 06:27:52PM -0400, Lyude Paul wrote:
> > > A variant of SpinLock that is expected to be used in noirq contexts, and
> > > thus requires that the user provide an kernel::irq::IrqDisabled to prove
> > > they are in such a context upon lock acquisition. This is the rust
> > > equivalent of spin_lock_irqsave()/spin_lock_irqrestore().
> > 
> > So aside from the horrendous camel-case thing, why are you naming this
> 
> Also - sorry I didn't notice this comment before, but I wanted to respond
> since it seems like you may not be aware: camel case is mandated as part of
> the rust standard:
> 
> https://rust-lang.github.io/api-guidelines/naming.html
> 
> Of course the kernel has its own coding standards that we need to conform to
> within reason! But if we tried to ignore camel casing for rust code we'd end
> up with rust code where everything would be mixed between types from core
> being camel cased and types from kernel crates not being camel cased.

Yeah, I'm aware, it is one of the very many reasons I find it very very
hard to like Rust :/

  reply	other threads:[~2024-07-26 20:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240725222822.1784931-1-lyude@redhat.com>
2024-07-25 22:27 ` [PATCH 1/3] rust: Introduce irq module Lyude Paul
2024-07-26  5:39   ` Greg KH
2024-07-26 17:45     ` Lyude Paul
2024-07-26  7:23   ` Benno Lossin
2024-07-26 18:18     ` Lyude Paul
2024-07-26 19:39       ` Benno Lossin
2024-07-26 10:13   ` Trevor Gross
2024-07-26 21:21   ` Boqun Feng
2024-07-26 21:30     ` Benno Lossin
2024-07-26 21:40       ` Boqun Feng
2024-07-25 22:27 ` [PATCH 2/3] rust: sync: Introduce LockContainer trait Lyude Paul
2024-07-26  7:40   ` Benno Lossin
2024-07-26 18:20     ` Lyude Paul
2024-07-25 22:27 ` [PATCH 3/3] rust: sync: Add IrqSpinLock Lyude Paul
2024-07-26  7:48   ` Peter Zijlstra
2024-07-26 18:29     ` Lyude Paul
2024-07-26 20:21     ` Lyude Paul
2024-07-26 20:26       ` Peter Zijlstra [this message]
2024-07-27 11:21   ` kernel test robot

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=20240726202610.GU26599@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=a.hindborg@samsung.com \
    --cc=airlied@redhat.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@redhat.com \
    --cc=gary@garyguo.net \
    --cc=kernel@valentinobst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=lyude@redhat.com \
    --cc=mingo@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=wedsonaf@gmail.com \
    --cc=will@kernel.org \
    --cc=yakoyoku@gmail.com \
    /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