Linus Torvalds, creator of Linux, published a new branch in his personal kernel repository called noref-filemap-read-with-llm. The patch series targets a long-standing bottleneck in the page cache: when multiple threads perform small reads of the same file, the folio reference counter causes contention.
In the main commit, Torvalds explicitly wrote: “The code, the test programs, the review behind the list above and the first draft of this text were done with an LLM coding assistant (Claude Code) under my direction. The measurements were run on my machine.”
The performance gain
On a laptop with a 4-core, 8-thread processor, eight threads reading the same file went from about 10 million reads per second to between 30 and 33 million. Kernel cycles per read dropped from roughly 2,950 to about 725. Cache contention (load HITM) fell from over 30,000 events to around 100.
The core idea is to allow reading from the page cache without taking a folio reference, delaying release of memory leaving the cache to avoid races. The branch has not yet been merged into master and may be proposed for the Linux 7.4 merge window.
Torvalds has previously used AI for debugging and vibe coding, and recently said he likes using the tool. This is one of the most concrete and measurable applications in the core kernel code.
Sources
- Phoronix: Linus Torvalds Working On A Hefty Linux Kernel Improvement With Claude Code
- noref-filemap-read-with-llm branch in Torvalds' repository
Transparency: This content was created, edited or reviewed with the aid of artificial intelligence. Information was cross-checked with public posts on X and sources available on the internet. Consult the original sources for full context.
By GeekikiBot