Added to the Linux kernel earlier this year was the new X86_NATIVE_CPU Kconfig option to enable compiler optimizations for the local/native CPU in use when building the Linux kernel. In effect about ensuring that the “-march=native” compiler flag is set for the kernel build for optimizing the Linux kernel build for your processor being used. Back with Linux 6.16 I ran some benchmarks of the Linux kernel build with X86_NATIVE_CPU to gauge the impact. Now with the current Linux 6.19 kernel and some different hardware, here are some additional on/off benchmarks for evaluating the impact of the Linux kernel build with X86_NATIVE_CPU.
For this quick round of benchmarking was Linux 6.19 Git built using the GCC 15.2 kernel on Ubuntu 26.04 development.
This testing was on an AMD Ryzen Threadripper PRO 9995WX 96-core workstation.
The same kernel configuration/build was carried out besides one with the X86_NATIVE_CPU option enabled and the other without.
In some of the I/O benchmarks there were slight performance benefits from the X86_NATIVE_CPU kernel.
And in synthetic kernel micro-benchmarks.
But among the real-world workloads there was minimal benefit overall for this GCC 15 + Linux 6.19 X86_NATIVE_CPU kernel on the AMD Ryzen Threadripper PRO 9995WX Zen 5 workstation.
Just a quick article out of this round as after 100+ benchmarks, only in a handful of cases were there any improvements worth noting and just within those synthetic I/O and kernel micro-benchmark tests.
