public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] rust: file: optimize rust symbol generation for FileDescriptorReservation
@ 2025-03-17 10:29 Benno Lossin
  0 siblings, 0 replies; 4+ messages in thread
From: Benno Lossin @ 2025-03-17 10:29 UTC (permalink / raw)
  To: Kunwu Chan, ojeda, alex.gaynor, boqun.feng, gary, bjorn3_gh,
	a.hindborg, aliceryhl, tmgross, dakr, nathan,
	nick.desaulniers+lkml, morbo, justinstitt
  Cc: rust-for-linux, linux-kernel, llvm, Kunwu Chan, Grace Deng

On Mon Mar 17, 2025 at 3:37 AM CET, Kunwu Chan wrote:
> From: Kunwu Chan <kunwu.chan@hotmail.com>
>
> When build the kernel using the llvm-18.1.3-rust-1.85.0-x86_64
> with ARCH=arm64, the following symbols are generated:
>
> $ nm vmlinux | grep ' _R'.*FileDescriptorReservation | rustfilt
> ... T <kernel::fs::file::FileDescriptorReservation>::fd_install
> ... T <kernel::fs::file::FileDescriptorReservation>::get_unused_fd_flags
> ... T <kernel::fs::file::FileDescriptorReservation as core::ops::drop::Drop>::drop
>
> These Rust symbols are trivial wrappers around the C functions
> fd_install, put_unused_fd and put_task_struct. It
> doesn't make sense to go through a trivial wrapper for these
> functions, so mark them inline.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1145
> Suggested-by: Alice Ryhl <aliceryhl@google.com>
> Co-developed-by: Grace Deng <Grace.Deng006@Gmail.com>
> Signed-off-by: Grace Deng <Grace.Deng006@Gmail.com>
> Signed-off-by: Kunwu Chan <kunwu.chan@hotmail.com>

Reviewed-by: Benno Lossin <benno.lossin@proton.me>

---
Cheers,
Benno


> ---
> Changes in v2:
>  - Add link and Suggested-by
>  - Mark 'reserved_fd' as inline
>  - Reword commit msg
> ---
>  rust/kernel/fs/file.rs | 4 ++++
>  1 file changed, 4 insertions(+)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-18  8:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250317023702.2360726-1-kunwu.chan@linux.dev>
2025-03-17 10:24 ` [PATCH v2] rust: file: optimize rust symbol generation for FileDescriptorReservation Alice Ryhl
2025-03-18  8:24   ` Christian Brauner
2025-03-18  8:26 ` Christian Brauner
2025-03-17 10:29 Benno Lossin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox