The second version of the patches with the restructuring of the header files of the Linux kernel

Ingo Molnar presented the second version of a set of patches that can significantly reduce the time of rebuilding the kernel by restructuring the hierarchy of header files and reducing the number of cross-dependencies. The new version differs from the first version proposed a few days ago by being adapted for the 5.16-rc8 kernel, adding additional optimizations and implementing support for building using the Clang compiler. When using Clang, applying patches reduced build time by 88% or 77% in terms of CPU resource consumption. When completely rebuilding the kernel with the command “make -j96 vmlinux,” the build time was reduced from 337.788 to 179.773 seconds.

The new version also solves the problem with GCC plugins, corrects errors identified during the initial review process, and unifies duplicate declarations of the “task_struct_per_task” structure. In addition, the optimization of the linux/sched.h header file continued and the optimization of the header files of the RDMA subsystem (infiniband) was implemented, which made it possible to further reduce the build time by 9% compared to the first version of the patches. The number of kernel C files that include the linux/sched.h header file has been reduced from 68% to 36% compared to the first version of the patches (from 99% to 36% compared to the original kernel).

Source: opennet.ru

Add a comment