From: "Gary Guo" <gary@garyguo.net>
To: "Nakamura Shuta" <nakamura.shuta@gmail.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Miguel Ojeda" <ojeda@kernel.org>
Cc: "Lorenzo Stoakes" <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.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>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
rust-for-linux@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: page: mark Page::nid as inline
Date: Fri, 29 May 2026 13:17:43 +0100 [thread overview]
Message-ID: <DIV5KDONJ2NX.1HCIRZLQBZTK9@garyguo.net> (raw)
In-Reply-To: <20260529085316.27432-1-nakamura.shuta@gmail.com>
On Fri May 29, 2026 at 9:53 AM BST, Nakamura Shuta wrote:
> When building the kernel, the following Rust symbol is generated:
>
> $ nm vmlinux | grep ' _R'.*Page | rustfilt
> <kernel::page::Page>::nid
>
> `Page::nid` is a trivial wrapper around the C function `page_to_nid`.
> It does not make sense to go through a trivial wrapper for this function,
> so mark it inline.
>
> This follows commit 878620c5a93a ("rust: page: optimize rust symbol
> generation for Page"), which did the same for `alloc_page` and `drop`.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1145
> Signed-off-by: Nakamura Shuta <nakamura.shuta@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
> ---
> rust/kernel/page.rs | 1 +
> 1 file changed, 1 insertion(+)
prev parent reply other threads:[~2026-05-29 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 8:53 [PATCH] rust: page: mark Page::nid as inline Nakamura Shuta
2026-05-29 9:07 ` Alice Ryhl
2026-05-29 12:17 ` Gary Guo [this message]
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=DIV5KDONJ2NX.1HCIRZLQBZTK9@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=lossin@kernel.org \
--cc=nakamura.shuta@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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