RISC-V With Linux 6.3 Lands Optimized String Functions Via Zbb Extension

Written by Michael Larabel in RISC-V on 25 February 2023 at 02:55 PM EST. 13 Comments
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.
Related News
About The Author
Michael Larabel

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.

Popular News This Week