summaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpiutil.c
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2025-01-05 22:40:06 +0300
committerMiguel Ojeda <ojeda@kernel.org>2025-03-06 22:49:06 +0300
commit41b6a8122d888299e3e437dae3a36431e6dfd5c9 (patch)
tree516c026b431de8d25cf8b27d049a335bf37b62ee /lib/crypto/mpi/mpiutil.c
parentc3e4049a681ec86bfe56a05bf6c7ed68ae9cf364 (diff)
downloadlinux-41b6a8122d888299e3e437dae3a36431e6dfd5c9.tar.xz
rust: alloc: make `ReallocFunc::call` inline
This function can be called with different function pointers when different allocator (e.g. Kmalloc, Vmalloc, KVmalloc), however since this function is not polymorphic, only one instance is generated, and function pointers are used. Given that this function is called for any Rust-side allocation/deallocation, performance matters a lot, so making this function inlineable. This is discovered when doing helper inlining work, since it's discovered that even with helpers inlined, rust_helper_ symbols are still present in final vmlinux binary, and it turns out this function is inhibiting the inlining, and introducing indirect function calls. Signed-off-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20250105194054.545201-4-gary@garyguo.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions