[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLgh0OSDnVDwO1wY9kd3UjVqaYvk-jJA-nwiz2ghR0Yu3Zg@mail.gmail.com>
Date: Mon, 18 Aug 2025 10:04:11 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: lingfuyi@....com
Cc: Tamir Duberstein <tamird@...il.com>, Andreas Hindborg <a.hindborg@...nel.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 <lossin@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, lingfuyi <lingfuyi@...inos.cn>
Subject: Re: [PATCH] rust: xarray: optimize lock functions with inline attribute
On Mon, Aug 18, 2025 at 3:27 AM <lingfuyi@....com> wrote:
>
> From: lingfuyi <lingfuyi@...inos.cn>
>
> The XArray lock and try_lock functions are simple wrappers around
> the C functions xa_lock and xa_trylock. These Rust functions don't
> add significant logic beyond the unsafe FFI calls and safety guarantees.
>
> Mark them as inline to avoid unnecessary function call overhead in
> hot paths where XArray locking is frequent, such as in page cache
> operations and other kernel data structure management.
>
> This follows the same optimization pattern as other Rust kernel
> modules where simple C function wrappers are marked inline to
> improve performance.
>
> Signed-off-by: lingfuyi <lingfuyi@...inos.cn>
Thanks for the patch. Please see the Developer’s Certificate of Origin 1.1
https://docs.kernel.org/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
You need to use a known identity such as your real name to submit
patches to the kernel. Anonymous contributions aren't possible.
Also please include a version number in the email subject when sending
a new version of a patch.
Alice
Powered by blists - more mailing lists