News: 0001564684

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.16's New "X86_NATIVE_CPU" Option Enhances I/O & Some Graphics/Gaming Workloads

([Software] 14 Minutes Ago Add A Comment)


With the newly-released [1]Linux 6.16 kernel there is [2]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 [3]HP ZBook Ultra G1a laptop with AMD [4]Strix Halo SoC as an interesting test target for squeezing additional performance.

[5]

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.



[1] https://www.phoronix.com/search/Linux+6.16

[2] https://www.phoronix.com/news/Linux-6.16-X86_NATIVE_CPU

[3] https://www.phoronix.com/review/hp-zbook-ultra-g1a

[4] https://www.phoronix.com/search/Strix+Halo

[5] https://www.phoronix.com/image-viewer.php?id=linux-616-x86-native-cpu&image=linux_616_native_1_lrg



All the lines have been written There's been Sandburg,
It's sad but it's true Keats, Poe and McKuen
With all the words gone, They all had their day
What's a young poet to do? And knew what they're doin'

But of all the words written The bird is a strange one,
And all the lines read, So small and so tender
There's one I like most, Its breed still unknown,
And by a bird it was said! Not to mention its gender.

It reminds me of days of So what is this line
Both gloom and of light. Whose author's unknown
It still lifts my spirits And still makes me giggle
And starts the day right. Even now that I'm grown?

I've read all the greats
Both starving and fat,
But none was as great as
"I tot I taw a puddy tat."
-- Etta Stallings, "An Ode To Childhood"