Summary
- LLMs are great at finding Linux kernel bottlenecks but not reliable at producing clean fixes.
- Generated fixes were ‘hideous’ and required extensive auditing, rewrites, and message edits.
- Build times improved dramatically: allmodconfig +36%, incremental ~70%, noop ~90% faster.
It has been a very interesting time in the world of Linux, and whether that’s a good thing or not depends on your stance on LLM usage. Very recently, we saw Linus Torvalds fix a bug using AI, and Debian maintainers voted to allow LLM code submissions as long as the submitter takes all of the responsibility. Now, a developer for the kernel has reported that they used an LLM to locate a nasty bottleneck bug, but it turns out the AI was a far better spotter than it was a fixer.
An LLM helped find a Linux kernel bug, but wasn’t much help fixing it
Its code required a lot of reworking before it was ready
As spotted by Phoronix, Linux developer Lorenzo Stoakes of Arm sent an email detailing their work on the kernel. It turns out several single-threaded bottlenecks made building the kernel more arduous than it needed to be, so Stoakes set out to fix them.
To help them with their quest, Stoakes used the aid of an LLM, which turns out was far better at finding the problem than actually fixing it:
“An LLM was used to first determine where the bottlenecks were then to figure out how to improve them.
It generated a lot of code, much of it hideous.
I extensively audited and rewrote a lot of it, and heavily edited commit messages, the cover letter and comments.”
The good news is, despite the AI’s ‘hideous’ code, the bottlenecks have now been fixed. Stoakes reports that “allmodconfig builds up to 36% faster, incremental builds up to ~70% faster, and noop builds up to ~90% faster,” with noticeable speed improvements regardless of which device he used. And while the AI handled build runs and debugging, Stoakes did all of the final checks themselves.
Stoakes’ findings go hand-in-hand with what Linus Torvalds himself noticed with recent trends around kernel development. LLMs are getting a lot better at spotting bugs, and Linux kernel maintainers are being inundated with reports of small issues that a human may not ever have noticed. However, it seems it’ll still be a while until an LLM becomes a worthy contributor of code by itself.
Related
I run a 32GB GPU instead of paying for Claude or Codex, and Qwen 3.6 keeps up more than I expected
Local LLMs are good enough for many tasks

