AVX-512 xor_gen For Linux Updated & Looking Real Good For RAID Arrays

Written by Michael Larabel in Linux Storage on 2 September 2026 at 09:20 AM EDT. 6 Comments
LINUX STORAGE
Being worked on the past few months for the Linux kernel has been an AVX-512 optimized version of xor_gen() that is used for generating and validating parity blocks such as with Linux's software RAID 5 and RAID 6 arrays. The latest iteration of AVX-512 xor_gen() was posted today and shows some impressive results on AMD Zen 5 hardware.

Eric Biggers of Google who is responsible for many Linux crypto performance optimizations over the years has been the one leading this AVX-512 xor_gen() effort. It missed out on the Linux v7.3 merge window and has taken extra time to get to the mainline kernel due to now cleaning up the kernel's CPU feature flags for AVX and AVX_512 in the process. Biggers explained on yesterday's v5 patch series posting:
"This series consolidates and cleans up how the kernel handles CPU feature flags for AVX and AVX-512 when the underlying OS or hypervisor (if any) doesn't enable the required xstate features in XCR0.

Specifically, it makes the checks for xstate features be done in a single place at boot time for both UML and native x86, instead of everywhere kernel code wants to check for AVX or AVX-512 support.

Patch 8 then adds an AVX-512 optimized implementation of xor_gen() for RAID, which had been blocked on confusion around cpu_has_xfeatures() and its lack of implementation on UML."

The wait should be worth it with the very impressive gains shown by Eric Biggers on the v5 patch adding the AVX-512 optimized xor_gen. Testing on an AMD Ryzen 9 9950X desktop CPU is showing mighty great results especially for 4~8 disk RAID arrays:

xor_gen AVX-512 benchmarks


Hopefully this code is ready to go for the Linux v7.4 cycle later in the year.
Related News
About The Author

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