[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=LyWx+5FbZ8H2FzoXNF9TaYAf06qA-Fo83pCxP_e-94Q@mail.gmail.com>
Date: Wed, 28 Jan 2026 15:45:12 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Gary Guo <gary@...yguo.net>
Cc: Alexandre Courbot <acourbot@...dia.com>, Andreas Hindborg <a.hindborg@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] rust: add `CacheAligned` for easy cache line alignment of values
On Wed, Jan 28, 2026 at 3:41 PM Gary Guo <gary@...yguo.net> wrote:
>
> Unfortunately `repr(align())` does not accept expression or macro invocations.
> It's still possible with code-generation, but it'll be more tricky.
>
> On all archs that we do support today, I think the value is always 64. However
> it'd worth putting a FIXME or TODO (or assertion, maybe?) in case new archs gets
> addded where this isn't true.
The docs need to also avoid mentioning 64 themselves; otherwise,
someone may use this and rely on it being 64, i.e. not just cache
aligned, but actually 64.
If Andreas really wants a fixed 64 one, then perhaps we want several
types like `Aligned64` etc.
Cheers,
Miguel
Powered by blists - more mailing lists