All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "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>,
	"Andreas Hindborg" <a.hindborg@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>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Lorenzo Stoakes" <ljs@kernel.org>,
	"Vlastimil Babka" <vbabka@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	"Uladzislau Rezki" <urezki@gmail.com>
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: [PATCH v3 0/3] rust: add a few helpers
Date: Tue, 29 Sep 2026 19:56:47 +0200	[thread overview]
Message-ID: <20260929-cpu-helpers-v3-0-e968ce5ee613@kernel.org> (raw)

This series adds two helpers for obtaining information about the number
of numa domains and cpu count of the system. It also moves the `NumaNode`
struct from `alloc` to `numa`.

Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
---
Changes in v3:
- Drop Alice tag on patch 2 due to restructuring.
- Use a relaxed load to read `nr_online_nodes` (Gary).
- Move `NumaNode` from the `alloc` module to the `numa` module in a
  new patch (Alice).
- Rebase on v7.3-rc5.
- Link to v2: https://msgid.link/20260605-cpu-helpers-v2-0-0ad227f0d91b@kernel.org

Changes in v2:
- Move helpers out of the crate root into the `cpu` and `numa`
  modules (Miguel).
- Mark Rust wrappers `#[inline]` (Alice).
- Mark the `num_possible_cpus` C helper `__rust_helper` (Dirk).
- Mention the Rust null block driver as the consumer in commit
  messages (Miguel).
- Link to v1: https://msgid.link/20260215-cpu-helpers-v1-0-fab13d817a5e@kernel.org

---
Andreas Hindborg (3):
      rust: add a wrapper for the `num_possible_cpus` C function
      rust: add a wrapper for the `nr_online_nodes` C function
      rust: alloc: move `NumaNode` to the `numa` module

 rust/helpers/helpers.c         |  1 +
 rust/helpers/num_cpus.c        |  8 ++++++
 rust/kernel/alloc.rs           | 30 +++-----------------
 rust/kernel/alloc/allocator.rs |  6 ++--
 rust/kernel/alloc/kbox.rs      |  4 +--
 rust/kernel/alloc/kvec.rs      |  4 +--
 rust/kernel/cpu.rs             |  7 +++++
 rust/kernel/lib.rs             |  1 +
 rust/kernel/numa.rs            | 62 ++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 90 insertions(+), 33 deletions(-)
---
base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e
change-id: 20260215-cpu-helpers-08efb2572487

Best regards,
--  
Andreas Hindborg <a.hindborg@kernel.org>



             reply	other threads:[~2026-09-29 17:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 17:56 Andreas Hindborg [this message]
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-02  9:24   ` Peter Zijlstra
2026-10-03 12:03     ` Andreas Hindborg
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-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

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=20260929-cpu-helpers-v3-0-e968ce5ee613@kernel.org \
    --to=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=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=lossin@kernel.org \
    --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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.