New Linux Patch Establishes "CONFIG_X86_64_NATIVE" For -march=native Kernel Builds
([Linux Kernel] 61 Minutes Ago
Optimized Kernel Builds)
- Reference: 0001511493
- News link: https://www.phoronix.com/news/Linux-X86_64_NATIVE
- Source link:
Last week I wrote about [1]Linux patches cleaning up x86 32-bit kernel builds for x86_64 CPUs . The new iteration of those patches were sent out today, including the addition of a patch adding the CONFIG_X86_64_NATIVE Kconfig tunable for enabling "-march=native" kernel builds to cater your optimized kernel compilation for the CPU on which you are building the kernel.
The patch adding the CONFIG_X86_64_NATIVE option came after [2]Linus Torvalds came out against "completely broken" x86_64 micro-architecture feature levels . He's against adding Linux kernel build options to cater the compilation to different feature level targets, but he isn't against the notion of a "-march=native" kernel build to optimize for your own local CPU -- should you be into that, even if the performance benefits for the kernel build aren't always worthwhile.
Arnd Bergmann sent out the [3]v2 patches of the x86 32-bit cleanups as the second iteration of the work sent out last week. In addition to adding the "-march=native" kernel build option, the v2 patches keep the 32-bit KVM host support around for now. Last week's patches raised the idea of eliminating x86 32-bit KVM host virtualization support but that idea didn't garner enough interest to fly for now.
The v2 patches also drop the patch for 64-bit Silverlake support, remove the rejected x86_64 ISA feature level selection, and also reorganize the platform selection code.
See the [4]v2 patch series for those interested in this work and be on the lookout for the CONFIG_X86_64_NATIVE option if wanting to easily customize your kernel build for catering the compilation to the CPU you currently have in use.
[1] https://www.phoronix.com/news/Linux-Cleanup-x86-On-x86_64
[2] https://www.phoronix.com/news/Torvalds-Mind-Fart-x86_64-Level
[3] https://lore.kernel.org/lkml/20241210144945.2325330-1-arnd@kernel.org/
[4] https://lore.kernel.org/lkml/20241210144945.2325330-1-arnd@kernel.org/
The patch adding the CONFIG_X86_64_NATIVE option came after [2]Linus Torvalds came out against "completely broken" x86_64 micro-architecture feature levels . He's against adding Linux kernel build options to cater the compilation to different feature level targets, but he isn't against the notion of a "-march=native" kernel build to optimize for your own local CPU -- should you be into that, even if the performance benefits for the kernel build aren't always worthwhile.
Arnd Bergmann sent out the [3]v2 patches of the x86 32-bit cleanups as the second iteration of the work sent out last week. In addition to adding the "-march=native" kernel build option, the v2 patches keep the 32-bit KVM host support around for now. Last week's patches raised the idea of eliminating x86 32-bit KVM host virtualization support but that idea didn't garner enough interest to fly for now.
The v2 patches also drop the patch for 64-bit Silverlake support, remove the rejected x86_64 ISA feature level selection, and also reorganize the platform selection code.
See the [4]v2 patch series for those interested in this work and be on the lookout for the CONFIG_X86_64_NATIVE option if wanting to easily customize your kernel build for catering the compilation to the CPU you currently have in use.
[1] https://www.phoronix.com/news/Linux-Cleanup-x86-On-x86_64
[2] https://www.phoronix.com/news/Torvalds-Mind-Fart-x86_64-Level
[3] https://lore.kernel.org/lkml/20241210144945.2325330-1-arnd@kernel.org/
[4] https://lore.kernel.org/lkml/20241210144945.2325330-1-arnd@kernel.org/
phoronix