VOOZH about

URL: https://www.phoronix.com/news/ARM-Linux-Generic-Entry

⇱ ARM Linux Kernel May Shift To Generic Entry Code: Less Assembly But Lower Performance - Phoronix


👁 Phoronix

ARM Linux Kernel May Shift To Generic Entry Code: Less Assembly But Lower Performance

Written by Michael Larabel in Arm on 2 March 2025 at 06:16 AM EST. 35 Comments
A pull request was sent out on Friday that could potentially land for the upcoming Linux 6.15 kernel to transition ARM's kernel entry code from some architecture-specific Assembly over to using the generic entry code path. It means more unification and transitioning some Assembly code over to C, but it also comes with some hits to performance.

In a move similar to ongoing work for the ARM64 Linux kernel code, the 32-bit ARM kernel code has also been seeing activity to make use of the generic entry code within the kernel. Linus Walleij of Linaro has been pursuing this ARM generic entry effort and on Friday sent out a pull request looking to land this change.

Linus Walleij sums up the effort of convering the ARM Linux kernel to using the generic entry code:
Main upsides:

- Using the same common entry as used by x86_64, RISCV, S390 and Loongarch, probably soon also ARM64.

- Moves ARM away from the obsoleted context tracker entry points user_enter_callable() and user_exit_callable() are now only used by ARM, CSKY and Xtensa.

- Solves a few lockdep warnings in the process.

- Converts a bit of assembly into C.

Main downside:

- Slightly increased system call overhead, around 6% in measurements.

See this pull for those interested in the ARM Linux generic entry work. We'll see if it manages to land in the next kernel cycle.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.