Torvalds' First AI-Assisted Patch
After several revisions to his stance on AI-assisted contributions to the Linux kernel, Linus Torvalds has posted his first patch developed with the help of a large language model (LLM). This development branch aims to resolve an old issue involving significant cache contention when multiple CPUs access the same file. This scenario can occur in environments utilizing shared libraries, databases, and web servers. Previous attempts by various developers to fix this problem yielded mixed results, none providing an ideal, comprehensive solution.
Performance Gains and Real-World Impact
Torvalds initially drafted his own solution to this problem in early 2024 and has been using it on his personal laptop. However, he recently decided to "try to actually solve this thing using an LLM." He has now published his LLM-assisted solution in a development branch, reporting a 23x performance improvement in a dedicated synthetic benchmark. He cautions that the actual real-world impact will be less significant, as "no real load" would achieve these figures. It is anticipated that this improvement would primarily benefit server workloads rather than desktop machines.
Torvalds' Stance on AI in Kernel Development
Over time, Torvalds has generally adopted a pro-AI position regarding LLM tools, particularly within the tightly controlled, review-intensive environment of the Linux kernel code. Last July, he expressed his willingness to "absolutely put [his] foot down" on AI skeptics, highlighting that an automated code review tool used by the kernel team often outperforms human reviewers and has successfully identified basic programming errors that should not have been submitted.
Evolving Policy on AI Disclosure
The kernel team is even revising its policy to remove the requirement for patch authors to disclose the use of AI tools when generating their code. Torvalds has consistently maintained an assertive stance, reiterating that LLMs should be treated as another development tool, similar to compilers or editors. His expectation is simply that "people do their best and [...] understand what they are doing."
Expertise in AI Tooling
It can be argued that few individuals are better equipped to effectively utilize an LLM than Torvalds and, by extension, other kernel maintainers. There is a significant distinction between a highly experienced programmer employing an LLM to accelerate routine tasks and an inexperienced user attempting to generate complex code without a deep understanding of the underlying principles.
However, the integration of AI is not without its challenges. Due to the increasing proficiency of AI agents in identifying common security flaw patterns, the Linux security mailing list became "unmanageable" earlier in the year. While Linux has been addressing Common Vulnerabilities and Exposures (CVEs) at an impressive rate of approximately 2,000 per release, the team is being compelled to discontinue support for older hardware drivers. These drivers frequently become targets for numerous security reports despite their minimal install base.




