RISC-V With Linux 6.3 Lands Optimized String Functions Via Zbb Extension
The RISC-V architecture updates were merged this Saturday for the Linux 6.3 merge window.
On the RISC-V front for Linux 6.3 it's not as exciting as some of the other recent kernel cycles, but there still a few a few items to note this round. First up, RISC-V with Linux 6.3 has improved its extension detection and alternative patching infrastructure for dealing with non spec compliant extensions. There is also some performance and code size improvements for dealing with ftrace and the Zicbom extension no longer depends upon having proper compiler toolchain support. Zicbom as a reminder is the RISC-V ISA extension for Cache Block Management Operations.
The other new code for RISC-V in Linux 6.3 is having Zbb-optimized string routines. RISC-V's Zbb extension is the basic bit manipulation extension, one of four current "BitManip" specifications. For RISC-V platforms with the Zbb extension (and building Linux 6.3+ with the new RISCV_ISA_ZBB Kconfig option), this kernel work allows for faster string functions. Zbb-optimized implementations of strcmp, strlen, and strncmp are currently implemented. The patch adding this support hadn't provided any reference benchmarks for how much faster the RISC-V Zbb optimized functions are expected to be over the generic functions.
The full list of RISC-V feature changes for Linux 6.3 via this pull request that was merged to mainline earlier today.