]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: entry: Split ret_from_fork() into user and kernel
authorCharlie Jenkins <charlie@rivosinc.com>
Thu, 20 Mar 2025 17:29:22 +0000 (10:29 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 29 Apr 2025 06:27:10 +0000 (08:27 +0200)
commit5b3d6103b343d59e19bd641e4c31df519f4d250d
tree3e89ac9f105aae0076ea48372caabe02e6dd2491
parentf955aa8723a65759e920d4de8e5d076cef412afc
riscv: entry: Split ret_from_fork() into user and kernel

This function was unified into a single function in commit ab9164dae273
("riscv: entry: Consolidate ret_from_kernel_thread into ret_from_fork").
However that imposed a performance degradation.

Partially reverting this commit to have ret_from_fork() split again,
results in a 1% increase on the number of times fork is able to be called
per second.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/all/20250320-riscv_optimize_entry-v6-2-63e187e26041@rivosinc.com
arch/riscv/include/asm/asm-prototypes.h
arch/riscv/kernel/entry.S
arch/riscv/kernel/process.c