Linus Torvalds placed AI-generated code directly into a new Linux kernel branch named noref-filemap-read-with-llm, tripling small-read throughput on cached files. On October 12, 2026, the Linux creator used Anthropic’s Claude Code tool to write the code and then verified the performance measurements on his own laptop.
AI Code Triples Small-Read Throughput
Raw throughput surged from between 9.9 and 10.4 million reads per second to a range of 30 to 33 million reads per second. These measurements, run on Linus Torvalds’ Core i7-8565U laptop with mitigations disabled, show the impact of the experimental code targeting a scalability bottleneck in the Linux page cache.
When multiple concurrent threads perform small reads on the same file, the kernel traditionally forces the page cache to atomically increment and decrement reference counts on the folio holding that data. Executing 16-byte pread calls across eight threads dropped the cost per read from roughly 2,950 kernel cycles down to approximately 725 cycles, while cross-core load HITM traffic collapsed from 30,538 events to just 101.
Claude Code Rewrites Kernel Design
The new design removes races entirely rather than attempting to detect race conditions during direct copy attempts—an approach that repeatedly stalled in past engineering efforts.

“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.”
Linus Torvalds, Linux kernel maintainer
Single-threaded operations saw a modest efficiency gain, with basic reads falling from 452–454 cycles down to 408–409 cycles. If a single CPU accumulates more than 1,024 pages queued for release, the kernel forces an expedited grace period to prevent unbounded memory buildup.
Performance Gains Trade Off Against Stability
Reading an unmapped user page slows from about 4,150 cycles to 6,550 cycles because it triggers an extra failed fault before falling back to legacy paths. Under a 2 GiB virtual machine stress test, incomplete versions triggered the out-of-memory killer, though the final patch series completed successfully across one, two, four, and eight CPUs.
Torvalds also published an assoc-array-fixes Git tag as a second AI-assisted artifact alongside the memory management branch.
Torvalds Adopts AI Tools Despite Past Skepticism
By May 2026, Torvalds complained that automated bug reports had rendered the kernel security mailing list almost entirely unmanageable
, and in October 2024, he dismissed 90% of AI industry chatter as marketing hype. His stance evolved after Google open-sourced Sashiko in March 2026, an AI code-review system that caught roughly 53% of bugs in testing.
Defending AI tools against project critics, Torvalds posted on the kernel mailing list that Linux is not one of those anti-AI projects, telling dissenters they could fork the repository or walk away.
Neither the filemap branch nor the associative array fixes have reached the master branch yet, as both are candidates for the upcoming Linux 7.4 merge window pending multi-core hardware testing.