Linux 6.3 Improvements Yield Better Chances Of Successfully Compiling The Kernel With ~32GB RAM

Written by Michael Larabel in Linux Kernel on 2 March 2023 at 07:11 AM EST. 39 Comments
LINUX KERNEL
For those doing large Linux kernel builds such as with the "allyesconfig" build option for including as many of the available drivers as possible into the assembled Linux kernel image, objtool improvements ready to go with Linux 6.3 should cut down on the RAM usage and also speed-up the kernel build time. These improvements were motivated by Linux kernel developers beginning to run out of memory when trying to carry out the "allyesconfig" kernel builds on desktops with 32GB of RAM.

Sent in this morning for the Linux 6.3 merge window were the objtool improvements. Thanks to the work of Intel's Peter Zijlstra, the maximum memory usage has been reduced for objtool and should in turn provide faster kernel builds and less out-of-memory failures. The out-of-memory failures have been most pronounced when carrying out "big" kernel builds such as with allyesconfig or similar and then trying to build the final kernel image. Or similarly those with even less than 32GB of system RAM may have better success now in building various other large kernel configurations.

Memory pressure at Phoronix


For an allyesconfig kernel build, the objtool patches should lead to its memory consumption dropping by about 6G and being faster than before. This objtool work was previously covered on Phoronix when the patches were originally volleyed and outlined in more detail at Linux objtool Improvements Help Reduce RAM Usage & Build Time During Large Kernel Builds.

The objtool patches for Linux 6.3 also shrink the "struct instruction" to further enhance the objtool performance and memory footprint. The Linux kernel objtool is run at compile-time to reverse-engineer the control flow graph of compiled objects for various validations/modifications/optimization purposes.

The full list of objtool changes for Linux 6.3 can be found via this pull request now awaiting action by Linus Torvalds ahead of the v6.3 merge window closing this weekend.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week