From: Yury Norov <ynorov@nvidia.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Andreas Hindborg" <a.hindborg@kernel.org>,
"Yury Norov" <yury.norov@gmail.com>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Burak Emir" <burak.emir@gmail.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Vlastimil Babka" <vbabka@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Uladzislau Rezki" <urezki@gmail.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v3 1/3] rust: add a wrapper for the `num_possible_cpus` C function
Date: Mon, 12 Oct 2026 11:34:50 -0400 [thread overview]
Message-ID: <asz-GkGHJYHdhDLr@yury> (raw)
In-Reply-To: <CANiq72=j1nD6Qy9qKwNKjBw1gc8RPr8CmXKXSSNBp7mARv48VQ@mail.gmail.com>
On Fri, Oct 02, 2026 at 11:07:00AM +0200, Miguel Ojeda wrote:
> On Fri, Oct 2, 2026 at 10:33 AM Andreas Hindborg <a.hindborg@kernel.org> wrote:
> >
> > I don't think we need to split the helper C files by the headers they
> > are defined in. We can include multiple headers in a C file that
> > logically lumps things together. If you are worried about finding things
> > becoming difficult because they are not in the file one expect, I do not
> > share the concern. I usually just grep in the directory through my
> > editor.
>
> Of course, it doesn't need to be a strict split. But, where possible,
> I think it is better to match the C side for the helpers, because they
> are thin wrappers that need to be updated and maintained at the same
> time as the C side.
Yes, that's correct. This should mirror the kernel file structure
unless there's a strong reason to change that.
Andreas, can you put this into rust/helpers/cpumask.c, and please have
the __rust helper thing on a separate line for better greppability.
This patch creates a new file without a maintenance entry, which is a
no-go anyways, so we need v4.
> In any case, I mentioned it especially because `cpumask.h` already
> exists and because it avoids an extra `#include` as I mentioned.
>
> > I don't think we need that kind of granularity at the moment. If things
> > become messy, we can just refactor.
>
> Just in case: `cpumask.rs` already exists, i.e. we are not adding new
> granularity (or what do you mean by "at the moment" otherwise?)
>
> Cheers,
> Miguel
next prev parent reply other threads:[~2026-10-12 15:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 17:56 [PATCH v3 0/3] rust: add a few helpers Andreas Hindborg
2026-09-29 17:56 ` [PATCH v3 1/3] rust: add a wrapper for the `num_possible_cpus` C function Andreas Hindborg
2026-09-29 18:30 ` Miguel Ojeda
2026-09-30 7:46 ` Andreas Hindborg
2026-09-30 10:25 ` Miguel Ojeda
2026-09-30 11:34 ` Andreas Hindborg
2026-09-30 11:38 ` Miguel Ojeda
2026-10-01 20:15 ` Miguel Ojeda
2026-10-02 8:33 ` Andreas Hindborg
2026-10-02 9:07 ` Miguel Ojeda
2026-10-12 15:34 ` Yury Norov [this message]
2026-10-13 7:24 ` Andreas Hindborg
2026-10-13 17:27 ` Miguel Ojeda
2026-10-13 17:51 ` Yury Norov
2026-10-02 9:24 ` Peter Zijlstra
2026-10-03 12:03 ` Andreas Hindborg
2026-10-12 15:37 ` Peter Zijlstra
2026-09-29 17:56 ` [PATCH v3 2/3] rust: add a wrapper for the `nr_online_nodes` " Andreas Hindborg
2026-09-30 15:14 ` Gary Guo
2026-10-12 15:04 ` Miguel Ojeda
2026-10-12 15:20 ` Yury Norov
2026-10-12 16:12 ` Yury Norov
2026-09-29 17:56 ` [PATCH v3 3/3] rust: alloc: move `NumaNode` to the `numa` module Andreas Hindborg
2026-09-30 15:12 ` Gary Guo
2026-10-12 15:50 ` Yury Norov
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=asz-GkGHJYHdhDLr@yury \
--to=ynorov@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=burak.emir@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=ljs@kernel.org \
--cc=lossin@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tglx@kernel.org \
--cc=tmgross@umich.edu \
--cc=urezki@gmail.com \
--cc=vbabka@kernel.org \
--cc=work@onurozkan.dev \
--cc=yury.norov@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
all inboxes | Powered by JetHome®