Linux objtool Improvements Help Reduce RAM Usage & Build Time During Large Kernel Builds

Prolific kernel developer Peter Zijlstra with Intel recently took to optimizing the memory use of objtool after "Boris [Petkov] complained he could no longer build allyesconfig on his 32G desktop machine without having [out of memory] terminate either objtool or chrome."
Zijlstra sent out a new patch series to rein in its memory use. These patches were able to shrink the memory use during a "allyesconfig" kernel build by about 6G, thereby allowing the large kernel build to succeed again comfortably on systems with ~32GB of RAM.
It also turned out the Linux kernel Clang continuous integration (CI) also began recently hitting memory issues while these patches have also addressed those problems. In addition these objtool patches sped up the kernel build time by nearly one minute for the all "yes" configuration.
Hopefully these objtool patches will be ready for the upcoming Linux v6.3 merge window.
19 Comments