The huge 2.3k patch series will improve Linux build performance by 50~80% and fix dependency hell

Ingo Molnar, who has been engaged in Linux kernel development for a long time, released a set of large-scale patches today. As many as 2,297 patches have been organized since the end of 2020, and completely reshape the header file hierarchy of the Linux kernel. The goal of this fast kernel header file work is to speed up the build time of the kernel while cleaning up many things in the process to solve the dependency hell problem.

join us on telegram

This huge set of patches involves most of the Linux kernel codebase, because it redesigned the header file processing of the kernel build. The end result is to accelerate the speed of Linux kernel compilation, whether it is a clean build or an incremental build.

Molnar wrote in the patch letter: Most kernel developers know that there are about 10,000 main .h header files in the Linux kernel, in the include/ and arch/*/include/ levels. In the past 30 years Here, they have grown into a complex and painful cross-dependence relationship, which we affectionately call dependency hell.

According to Ingo’s data, in kernels with fast kernel header files enabled, the amount of kernel builds per hour maybe 78% more than the current original kernel. In the supported architecture, the absolute core build performance may increase by 50-80%.

This large patch series decouples many advanced header files from other files, removes unnecessary functions, decouples types and API header files, automatically handles header file dependencies, and various other changes. So far, this huge patch series has been tested on x86/x86_64, SPARC, MIPS and ARM64.

This may be the largest Linux kernel function adjustment in the history of the code. At present, it was initially issued in the form of “soliciting comments. Such a wide range of kernel build time improvements are very tempting, so I hope that this patch series will eventually manage to enter the mainline kernel after being reviewed in some way in the near future. For all the exciting details about the Linux fast kernel header files, please see here.

Leave a Comment