Massive ~2.3k Patch Series Would Improve Linux Build Times 50~80% & Fix "Dependency Hell"

Written by Michael Larabel in Linux Kernel on 2 January 2022 at 06:25 PM EST. 50 Comments
LINUX KERNEL
Longtime Linux kernel developer Ingo Molnar posted a massive set of patches today: 2,297 patches that have been in the works since late 2020 and completely rework the Linux kernel's header file hierarchy. The goal of this "fast kernel headers" effort is to speed up kernel build times and also clean-up a lot of things in the process to address the "dependency hell".

This massive set of patches touches most of the Linux kernel code-base as it reworks the header file handling for the kernel builds. But the end result is faster Linux kernel compilations both for clean builds and incremental builds.

Molnar wrote in the patch cover letter, "As most kernel developers know, there's around ~10,000 main .h headers in the Linux kernel, in the include/ and arch/*/include/ hierarchies. Over the last 30+ years they have grown into a complicated & painful set of cross-dependencies we are affectionately calling 'Dependency Hell'."

According to Ingo's figures, there could be as many as 78% more kernel builds per hour with the "Fast Kernel Headers" enabled kernel than the current stock kernel. A 50~80% improvement in the absolute kernel build performance on supported architectures is possible.


This big patch series decouples much of the high level headers from others, uninlining of unnecessary functions, a decoupling of the type and API headers, automated dependency handling of header files, and a variety of other changes. This massive patch series has been tested so far on x86/x86_64, SPARC, MIPS, and ARM64.

It's a massive patch series and likely the single biggest Linux kernel feature ever by code size. For now though it's being initially sent out as a "request for comments". The kernel build time improvements are very tantalizing, so hopefully this patch series has feet and will manage to work its way into the mainline kernel in the not too distant future after somehow being reviewed.

See the patch cover letter for all the exciting details on Linux Fast Kernel Headers.
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