Linus Torvalds tests Claude Code directly on the Linux kernel
October 12, 2026

An unmerged kernel series is said to triple small parallel reads on Torvalds’ laptop. Just as notable is how openly he documents Claude Code as a tool.
What this is about
Linus Torvalds published an unusual development branch in his own Linux repository on October 12, 2026. Its eight patches, under noref-filemap-read-with-llm, change how the Linux kernel handles small parallel reads from the page cache. In the cover letter, Torvalds says that code, test programs, the review of open issues, and a first draft of the letter were produced with Claude Code.
The series has not been merged into Linux. It sits on top of Linux 7.3 rc6, making it a publicly reviewable experiment rather than a finished promise. It still matters because this is not a demo project using a coding assistant. The founder of Linux is using one on a particularly sensitive part of the kernel.
What the kernel series actually does
When several CPU cores read tiny pieces of the same file, they normally increment and decrement a reference counter for the relevant memory page. Those atomic writes hit the same cache line. The line has to move between cores and becomes a bottleneck under heavy parallel load.
Torvalds’ approach avoids taking that reference during reads. Pages removed from the cache are not reused immediately. They are freed only after an RCU grace period, allowing readers to copy directly while protected by RCU. An extra safeguard activates when more than 1,024 deferred pages accumulate per CPU. A worker then forces an expedited grace period.
On Torvalds’ four core, eight thread laptop, measured performance for 16 byte pread() calls against the same page rose from roughly 9.9 to 10.4 million reads per second to 30 to 33 million. Kernel cycles per read fell from about 2,950 to 725. With one thread, the cost declined from 452 to 454 cycles to 408 to 409.
Why it matters
The measurements cover a narrow special case. Even so, the work illustrates two broader issues. First, one small shared memory structure can severely slow an otherwise cheap operation on modern multicore processors. A correct kernel fix could help databases, search systems, and other software that performs many small parallel reads. Whether the effect is measurable outside the test still needs to be established.
Second, Torvalds provides a rare concrete example of AI assisted systems programming. He does not assign authorship or decision authority to Claude Code. Instead, he names the work the tool performed and publishes patches, tests, measurements, and open problems for the normal kernel review process. That traceability matters more than the bare claim that AI wrote code.
In plain language
Imagine eight people who must take the same key from a small box and return it for every sheet of paper they read. The paper is already in front of them, but everyone crowds around the box. The proposed design lets them read while the key remains safely held for a short time. The crowd disappears, but the caretaker must ensure that too many held keys do not pile up.
A practical example
A file service answers eight requests at once, each reading only 16 bytes from the same frequently used index file. In the synthetic test, the existing path handles around 10 million such reads per second. The new series reaches 30 to 33 million on the same test machine.
That does not mean an entire file service becomes three times faster. Networking, storage, application code, and larger reads remain unchanged. The improvement applies specifically where several cores compete over the same reference counter. Operators would need to test their own workloads before expecting a benefit.
Scope and limits
- The eight patches are not merged. Kernel developers may substantially change or reject the design after reviewing its assumptions and memory behavior.
- The peak numbers come from one laptop, one synthetic benchmark, and disabled mitigations. They are not a general Linux benchmark.
- Deferring memory reuse can create pressure elsewhere. An earlier version triggered the out of memory killer in a two gigabyte virtual machine; the added threshold is intended to contain that risk.
- Claude Code does not replace review or responsibility. Torvalds identifies unresolved issues, and independent review must still establish whether the approach is correct and maintainable.
SEO and GEO keywords
Linus Torvalds, Claude Code, Linux kernel, Linux page cache, RCU, multicore processor, kernel development, coding assistant, pread, memory management, Linux 7.3
💡 In plain English
Linus Torvalds used Claude Code while developing an unmerged Linux kernel change. One narrow test became about three times faster, but the change still needs independent review and broader measurements.
Key Takeaways
- →Torvalds explicitly credits Claude Code as a tool for code, tests, problem analysis, and a first draft.
- →The series avoids a contested reference counter during small parallel reads.
- →In the eight thread test, throughput rose from roughly 10 million to 30 to 33 million reads per second.
- →The patches are public but have not been merged into Linux.
- →Memory pressure and the generality of the benchmark remain open questions.
FAQ
Is the code already part of Linux?
No. The eight patches are in a development branch maintained by Torvalds and still need to pass the normal review process.
Did Claude Code write the Linux kernel by itself?
No. Torvalds describes it as contributing code, tests, problem analysis, and a text draft. Humans still own the decisions, responsibility, and publication.
Will this make Linux three times faster?
No. The factor applies to a narrow test with eight threads making tiny reads from the same memory page.
What is the biggest open risk?
Deferring page reuse can be problematic under memory pressure. The series adds a threshold, but its behavior still needs broader testing.