New Linux Patch Establishes “CONFIG_X86_64_NATIVE” For -march=native Kernel Builds


LINUX KERNEL

Last week I wrote about 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 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 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.

X86_64_NATIVE option

See the 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.



Source link

Leave a Comment

Your email address will not be published. Required fields are marked *