Arm Engineer Uses AI to Optimize Linux Kernel Builds, 23 Patches Deliver Up to 90% Speedup
Arm engineer and longtime Linux kernel contributor Lorenzo Stoakes has used a large language model to help optimize the Linux kernel build process, ultimately submitting 23 patches that cut build times by up to roughly 90%.
According to Stoakes, the AI proved effective at analyzing the build pipeline, identifying performance bottlenecks, and assisting with build execution, testing, debugging, and result analysis. However, much of the code it generated was, in his words, "hideous." He rewrote a significant portion of the patches and substantially revised commit messages, patch descriptions, and code comments.
The optimization targeted serial tasks in the kernel build system that leave many CPU cores idle, aiming to reduce serialization and increase parallelism. The patches touch Kbuild, kallsyms, modpost, objtool, mksysmap, and the Rust build system.
After manual review and verification, the patches delivered measurable speedups across different hardware and kernel configurations: allmodconfig builds are up to 36% faster, incremental builds up to about 70% faster, and noop builds up to about 90% faster.
Stoakes did not disclose which LLM he used. Because the development process relied heavily on AI, the submissions carry an "Assisted-by" tag to indicate AI involvement.

