With the newly-released Linux 6.16 kernel there is the new X86_NATIVE_CPU build option if wanting to optimize your kernel build for your local CPU in use. Enabling CONFIG_X86_NATIVE_CPU is setting the “-march=native” compiler optimizations for the kernel build in an effort to ensure peak performance/optimizations for the local system. Here are some benchmarks looking at the impact of X86_NATIVE_CPU on Linux 6.16 while using the HP ZBook Ultra G1a laptop with AMD Strix Halo SoC as an interesting test target for squeezing additional performance.
The CONFIG_X86_NATIVE_CPU option can be useful for those building their own kernel as a Linux enthusiast and wanting to ensure peak performance. The X86_NATIVE_CPU option may also have some interest by those administering HPC clusters and the like with an entire fleet of systems all using the same CPU family and striving for optimal Linux performance. With the “-march=native” compiler optimizations it’s not practical for distribution vendor kernels and the like or other generic kernel images.
I’ve been eager to run some CONFIG_X86_NATIVE_CPU on/off particularly with many upstream kernel developers having for years debated the merits of compiler optimizations for the Linux kernel and some also being against them due to increasing the difficulty of debugging such kernel builds. In any event for today’s article with the HP ZBook Ultra G1a featuring the AMD Ryzen AI Max+ PRO 395 “Strix Halo” I ran some benchmarks of a Linux 6.16 kernel build and then the same kernel build but with CONFIG_X86_NATIVE_CPU=y.
The kernel build configuration was derived from the Ubuntu Mainline Kernel PPA configuration and just dropping the Debian key references and then toggling whether CONFIG_X86_NATIVE_CPU was set. GCC 14.2 as the stock compiler of Ubuntu 25.04 was used for building the enabled/disable kernels being compared from this same laptop. The CPU power consumption was also monitored during this comparison.