FR
live

Linus Torvalds hands Claude Code a rewrite of the Linux page-cache read path

On 11 October 2026, Linus Torvalds published a kernel branch that reads from the page cache without taking folio references, written with the Claude Code coding assistant to relieve contention between many threads reading one file. If you run a heavily concurrent file server, watch this patch series: it targets the exact multi-threaded small-read bottleneck you feel, and it may land in Linux 7.4.

A single page pulled halfway out of a thick stack of identical grey ledger pages, an amber tab on the corner.

11 October 2026. Linus Torvalds pushes a new branch to his torvalds/linux.git repository: noref-filemap-read-with-llm. 12 October 2026. Linux 7.3-rc7 ships, with 7.3 expected the following weekend. A first. In the patch message, the Linux creator states that the code, the tests, the review and the first draft of the text were produced by a coding assistant — Anthropic’s Claude Code. Why it matters: the most conservative maintainer in the ecosystem has just delegated real work on the kernel’s memory-management subsystem, the most sensitive area there is, to a language model.

What the noref-filemap-read-with-llm branch does

The branch attacks a specific problem in the MM subsystem. When many threads read small pieces of the same file — a shared library, a hot config file, a static page served by a web server — they all go through the page cache. And they all contend for the same object: the folio reference count.

The folio is the modern abstraction that replaced struct page as the way a page-cache entry is represented. Every read that touches it calls folio_get and folio_put, which increment and decrement an atomic counter. The operation is atomic, so it is safe — but it has a cost: the cache line holding the counter must bounce from one core to another on every read. The more threads hit the same file, the worse the contention gets, and small reads slow down for a reason that has nothing to do with disk or memory.

Torvalds’s idea is easy to state and hard to execute: read the page cache without taking a folio reference. If the page can be kept alive by other means for the duration of the read, the atomic operation drops out of the hot path. The branch name, noref, says exactly that — “no reference.”

The confession in the patch message

It is the patch message that made the rounds. Torvalds wrote it in plain English:

“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 phrase “under my direction” is not a detail. Torvalds steers the model; he does not let it write unsupervised. Phoronix notes he has long used AI for kernel debugging, and outside the kernel tree he has done “vibe coding” with Google’s Antigravity. He has also said publicly that he sees AI as “a useful tool.” What is new is not the use but the location: this time the result targets the heart of the kernel itself.

Why memory management is the most sensitive ground

You have to understand Linux to measure what this gesture means. The memory-management subsystem is the core of the core. A refcount error here does not produce a simple crash: it produces silent corruption, a page freed while still in use, or a leak that drains memory after weeks of uptime. Bugs of this kind are among the hardest in the kernel to reproduce and fix.

That is exactly why the announcement matters. Torvalds is famous for his brutal rigor on patches touching MM. That he would present a series written largely by a language model — with his own signature in the patch message, taking responsibility — sends a signal to the whole ecosystem: the tool is judged mature enough to be used where there is no room for error.

The context confirms it. In recent days Torvalds has also pushed back publicly against those who reject AI outright, inviting them to leave Linux or fork it. The message is consistent: AI is a tool like any other, and he intends to use it himself wherever he judges it adds something.

What impact, and for whom

Phoronix describes the series’ impact as significant, with a clear difference on the contention scenario — many small reads of one file by many threads. The benefit is therefore concentrated on workloads that do exactly what the patch describes: file servers, caching proxies, web servers serving a hot static file, and databases whose threads re-read the same block.

Do not expect a general speedup. Think of a web server that serves a small, popular file — a favicon, a manifest, a hot JSON endpoint — to thousands of concurrent connections. Every one of those requests has to bump the same folio’s reference count twice. The branch removes that bump from the path, which is exactly the kind of micro-optimization that shows up in tail-latency percentiles rather than average throughput. A single thread reading a large file sequentially barely feels this contention, and the patch changes nothing for it. That is the nature of such optimizations: they are worth their complexity only on paths where the bottleneck is real, and Torvalds documents precisely which one he targets.

The branch is not merged yet. It lives on the noref-filemap-read-with-llm branch of Torvalds’s repository, and he will decide whether to merge it for the Linux 7.4 merge window, which opens after 7.3 ships. Nothing guarantees it lands as-is: a series touching page-cache refcounts will go through tight review before it enters mainline.

A shift in how the kernel gets written

This is not an isolated experiment. Phoronix has tracked a steady flow of AI-adjacent work reaching the kernel in recent weeks — a proposal to add AI agent resources, and AI skills meant to help developers. The 7.3 cycle has been described as the new “AI normal.” The difference here is the authority of the author.

Torvalds was an early skeptic, and once dismissed AI as mostly marketing. His position has moved in stages: first a tool for debugging, then for “vibe coding” experiments outside the kernel, and now — in this branch — an assistant that drafts real memory-management code under his direction. The trajectory matters more than any single patch.

For kernel developers, the practical question is what this means for review. A patch series from a machine is no different from one from a junior contributor: it earns its place by passing the same review, the same testing and the same scrutiny from the MM maintainers. Torvalds’s own message models this — he lists what the model did, what he directed and what he measured himself. That kind of attribution, rather than hiding the tool, is what lets reviewers judge the work on its merits.

Verdict

If you run a heavily concurrent file server or proxy, watch this series and test it against your own load: it is one of the rare cases where a kernel optimization targets the exact small-read contention you suffer. If you contribute to the kernel, treat this branch as a template: an assistant that produces a patch with tests, a documented review and reproducible measurements is easier to evaluate than a human patch with no provenance. If you are skeptical about AI in systems software, this is the moment to reconsider: the kernel’s maintainer just put the tool through its paces on the hardest ground there is, and he chose to say so rather than hide it.

References

The cyber brief, every Tuesday

The flaws that matter and the patches to apply, in a ten-minute read.

No spam. One-click unsubscribe.
read next

On the same topic

Nova turns the Linux kernel’s GPU subsystem into Rust’s proving ground

As the Linux 7.4 merge window approaches, the Rust-written NVIDIA Nova driver keeps building out the kernel’s Rust DRM infrastructure. It is a tipping-point signal: the graphics subsystem is becoming the place where Rust earns its stripes in the kernel, one GPU at a time.

Debian bundles 1,313 Linux kernel CVEs into a single Trixie update

Advisory DSA-6528-1, published September 29, 2026, fixes 1,313 CVE identifiers in Linux 6.12.111-1 for Debian 13 Trixie, a volume directly tied to AI-assisted vulnerability discovery in the kernel. A CVE identifier says nothing about severity or exploitability: the job is to update cleanly, not to panic at the number.

← Back to the feed

Type at least two characters.

↑ ↓ navigate ↵ open esc dismiss