Linus Torvalds let Claude Code fix the Linux page cache. Then reviewers found a race.
Linux creator and longtime lead maintainer Linus Torvalds turned to Anthropic’s Claude Code to tackle a kernel performance problem that
Linus Torvalds, creator of the Linux kernel, enlisted the help of Anthropic’s Claude Code to address a performance issue with the page cache that had persisted for over two years. After 18 months of Torvalds running a flawed version of his own fix, other developers encountered similar challenges. The new patches eliminate folio reference-count operations from a common buffered-read path, though Torvalds noted that real-world performance gains would be smaller.
However, reviewers uncovered a race condition and raised concerns about memory reclamation. Torvalds handed further development to Kiryl Shutsemau, a Linux kernel developer who had previously worked on the same bottleneck. The issue of page cache contention was identified by Matthew Wilcox, an Oracle engineer and Linux kernel memory-management developer, in a customer workload.
Claude Code generated the patches, which were later reviewed by Torvalds. These patches resulted in substantial performance improvements in synthetic benchmarks, with throughput increasing by a factor of 23 on Torvalds’ Ryzen Threadripper. In a heavy contention scenario on a 64-thread Threadripper, throughput surged from 13.3 million to 304 million reads per second.
Despite the performance gains, the patches introduced trade-offs, such as increased kernel cycles per read and potential regressions in certain scenarios.
Rewritten by urgent.news; may contain errors — check the original.
Sources: computerworld.com · theregister.com · thenewstack.io · dev.to · tomshardware.com · pcgamer.com · xda-developers.com
Also reported by 6 other outlets
- Linus Torvalds has started using AI to develop the Linux kernel computerworld.com
- Linux kernel devs drop obligatory confession of AI tool usage theregister.com
- How I keep secrets and personal data out of Claude Code dev.to
- Linus Torvalds posts his first AI-assisted patch to the Linux kernel, synthetic test clocks 23x performance leap tomshardware.com
- Linux kernel drops AI-contribution disclosure rule, as Linus Torvalds says banning the tech would be 'utterly stupid' pcgamer.com
- Linus calls banning AI-generated code "utterly stupid" as Linux submissions no longer need LLM disclosure xda-developers.com