[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72k7wnHsd6jrckkZtRpwbTPE+5ikbCw=_RexuRvwBSp-Rg@mail.gmail.com>
Date: Mon, 2 Jun 2025 16:44:38 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Yury Norov <yury.norov@...il.com>
Cc: Burak Emir <bqe@...gle.com>, Kees Cook <kees@...nel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>, Viresh Kumar <viresh.kumar@...aro.org>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...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>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
"Gustavo A . R . Silva" <gustavoars@...nel.org>, Carlos LLama <cmllamas@...gle.com>,
Pekka Ristola <pekkarr@...tonmail.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v10 4/5] rust: add find_bit_benchmark_rust module.
On Mon, Jun 2, 2025 at 4:32 PM Yury Norov <yury.norov@...il.com> wrote:
>
> > +const BITMAP_LEN: usize = 4096 * 8 * 10;
> > +// Reciprocal of the fraction of bits that are set in sparse bitmap.
> > +const SPARSENESS: usize = 500;
>
> Is there any simple mechanism to keep C and rust sizes synced? (If no,
> not a big deal to redefine them.)
One may pick them from C (possibly with a `RUST_HELPER_*` if needed).
If they are non-trivial macros, then using an `enum` instead of a
`#define` on the C side is also an alternative.
> What is the name policy for rust? Maybe a more human-readable name
> would work better here?
Up to the maintainers, and generally the same as for C. In the global
Rust samples and things like that we have `rust` in the name since
they are Rust samples after all, but there is no need to say `rust` or
`module` in actual modules etc. unless there is a reason for it.
I hope that helps!
Cheers,
Miguel
Powered by blists - more mailing lists