Linus Torvalds publishes Linux kernel patches written by Claude Code: the agent workflow validated at the highest level
🔎 Why this commit is different from the thousand AI announcements you've read
Around October 12, 2026, a branch named noref-filemap-read-with-llm appeared in Linus Torvalds' git tree — the very one from which the official Linux kernel releases come. Phoronix spotted it first. On the surface, nothing explosive: eight experimental patches, based on Linux 7.3-rc6, that rewrite the page cache read path.
Except that the commit message contains a sentence never seen before at this level of the project: "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 creator of Linux is publicly crediting an AI agent for infrastructure code — code, tests, review, draft of the cover letter — while keeping the direction, the measurements, and the signature. This isn't just another benchmark in the weekly avalanche. It's the creator of the most widely deployed kernel in the world drawing, in three lines of commit message, the boundary between assisted code and hand-written code.
The essentials
- A historic branch:
noref-filemap-read-with-llm, pushed by Linus Torvalds into his own git tree around October 12, 2026 — something he normally never does. - An explicit credit: the commit message credits Claude Code with the code, the test programs, the review, and the first draft of the text, "under my direction", with measurements run on his machine.
- A real technical subject: 8 patches on Linux 7.3-rc6 that remove the atomic increment of the folio reference counter in page cache reads, replaced by an RCU-based read with deferred memory freeing.
- A measured 3x gain: 16-byte reads by 8 threads, going from ~10 M to 30-33 M reads/s on a Core i7-8565U (CPU mitigations disabled).
- A clear status: experimental, not merged. Phoronix mentions a possible merge window for Linux 7.4.
- A telling precedent: Torvalds had already stated that he uses AI to debug the kernel, but this is the first public credit given to an agent for code at this level of infrastructure.
Recommended Tools
Torvalds' workflow relies on a terminal agent, driven by a human who measures every step. Our comparison of the best AI tools for coding details all the options; here are the essentials for reproducing this type of setup:
| Tool | Main use | Price (October 2026) | Ideal for |
|---|---|---|---|
| Claude Code | Terminal coding agent, long-running tasks, deep refactoring | Included in Claude Pro (from $20/month) and Max ($100-200/month), check on anthropic.com | Directing an agent on sensitive code, with systematic human review |
| Cursor | Agent-first IDE with visual diff | ~$20/month (check on cursor.com) | Those who want to keep a graphical interface |
| Cline | Open-source agent in VS Code | Free + API costs based on usage (check on cline.bot) | Full control over the pipeline and model choice |
| Qwen3-Coder-Next | Open-source model for coding agents (80B MoE, 3B active) | Free (open weights) | Self-hosting, workflows without a proprietary API |
To choose the model that powers your agent, our ranking of the best LLMs for coding is updated continuously.
What do these 8 patches change in the Linux kernel?
Direct answer: they remove from the page cache read path the one thing that forced all threads to fight over the same processor cache line — the atomic increment of the folio's reference counter. Instead, the read happens in an RCU critical section, and memory is only freed after a grace period.
The problem: a counter everyone fights over
When a process reads a file that is already cached, the kernel doesn't touch the disk: it serves the data from the page cache. But each read takes a reference on the folio — the cache's memory management unit — via an atomic operation.
This counter lives in a processor cache line. As soon as several threads read the same file in parallel, that line shuttles back and forth between cores: every increment invalidates the others' copy. The bottleneck is neither RAM nor storage — it's a counter of a few bytes. A problem reported as early as 2024, according to hwbusters.
The solution: reading without taking a reference, thanks to RCU
RCU (Read-Copy-Update) is a long-standing synchronization mechanism in the kernel: it lets you read shared data without locks or atomic operations, with the guarantee that the memory won't be freed while you're reading it. Freeing is simply postponed until after a "grace period".
The patches apply this technique to page cache reads: the thread reads within an RCU read-side critical section, without incrementing the counter. No more atomic operation on the hot path, no more contention. Memory is freed later.
The safeguard: 1024 pages per CPU, no more
Deferring the freeing comes at a cost: pages pile up while waiting for their grace period. Two of the eight patches therefore add a safeguard: beyond 1024 pages queued per CPU, a worker forces an expedited grace period to flush the queue.
This is very classic kernel engineering: a lockless fast path, bounded memory. And it's exactly the kind of trade-off a human must validate before signing off — which is what Torvalds did.
The numbers: 3x on small reads, under specific conditions
Direct answer: on his Core i7-8565U laptop, with CPU mitigations disabled, Torvalds measures a tripling of throughput on the worst imaginable case — 16-byte reads by 8 threads on the same file.
| Test scenario | Before | After | Gain |
|---|---|---|---|
| 8 threads, 16-byte reads, same file | ~10 M reads/s | 30-33 M reads/s | ~3x |
| 4 threads on separate cores | ~9-12 M reads/s | 25-26 M reads/s | ~2x to 2.5x |
Sources: measurements published by Torvalds, detailed by Startup Fortune and hwbusters.
Why this test case is deliberately extreme
16 bytes is the case where the fixed cost of each call dominates everything else — precisely where contention on a counter shows up the most. Workloads that multiply tiny reads on hot files (metadata, configs, myriads of small files) are the first affected. Your 64 KB or 1 MB reads will see a much smaller relative gain.
Two honesty details worth noting: the i7-8565U is a 4-core/8-thread chip, so the 8 threads saturate hyperthreading; and disabled mitigations means raw silicon, not a production config. Torvalds hides nothing: he publishes his full setup. That's rare, and it's the right practice.
Reproducing this kind of measurement without wrecking your machine
Compiling a kernel and testing it is something you do in an isolated environment. A VPS like Hostinger is more than enough for the compile/test loop, at a few euros per month. On the other hand, for numbers reproducible down to the CPU cycle, nothing replaces a dedicated physical machine — a shared VPS adds too much measurement noise.
The commit message, word for word: a historic first
Direct answer: this message does what almost no project does — it attributes precisely, clause by clause, what the AI did and what the human kept.
"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."
Translation: "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."
Three clauses deserve to be read slowly.
What the agent did: the code, the test programs, the review "behind the list", the draft of the text. Four deliverables, three of which count as verifiable engineering work.
What the human kept: the direction ("under my direction"), the measurements ("on my machine"), and implicitly the sign-off. Torvalds doesn't say "the AI wrote this patch". He says "I directed an agent that wrote this patch, I measured, I sign".
What isn't said: no diluting tag, no generalization along the lines of "generated by AI". Just a named tool, a named framework, responsibility owned. Note even the most revealing detail: the cover letter itself — the text that presents the work — had its draft written by the agent, but it's Torvalds who endorses it.
The context makes this weightier: Torvalds had already explained that he uses AI to debug the kernel. But publicly crediting an agent on code at this level of infrastructure is a first. And It's FOSS points out that the series itself gives no release target — a sign of work still under evaluation, not a marketing stunt.
Translator's note: the "Translation:" line is now identical to the quoted commit message, since the original quote was already in English in the source text.
A branch in Torvalds' tree: a signal in itself
Direct answer: Torvalds normally never pushes side branches into his main tree — the very fact that this branch appears there is a message.
His tree is where merges land, not a sandbox. Dropping an experimental branch that carries the -with-llm suffix right in its name into that tree means deliberately exposing it to the fiercest review in the industry — and to the public discussion that followed, very widespread across the community, as noted in the Reddit roundup of October 13.
My analysis: this is the opposite of a PR stunt. A blog post takes an hour to write and commits you to nothing. A branch in Torvalds' tree commits its author on the technical front, not the PR front. If he had wanted to generate buzz, he would have tweeted. He committed — in the most closely watched repository in the history of free software.
The "agent codes, human directs and measures" workflow dissected
Direct answer: what Torvalds documents — without presenting it as such — is a reproducible five-step protocol, and it fits in a single commit-message sentence.
- Frame the problem: a bottleneck identified back in 2024, a technical direction chosen (RCU, deferred freeing). The human decides on the architecture.
- Let the agent produce: the code, the test programs, the first draft of the cover letter.
- Human review: "the review behind the list above" — Torvalds re-read what the agent had produced.
- Measure on real hardware: "the measurements were run on my machine". No borrowed benchmark, no brochure numbers.
- Sign off: the patch goes out under his name, with the responsibility that comes with it.
The division of labor is a subtle one and deserves to be highlighted: the agent wrote the test programs, but it was the human who ran the measurements and validated the results. Writing a test and guaranteeing that it measures the right thing are two different responsibilities — Torvalds doesn't conflate the two.
The tools follow the same path, incidentally: Anthropic's Claude Code Agent View dashboard exists precisely to supervise what agents are doing without having to read their transcripts continuously. And if you want to build a guardrailed agent with your own hands, our guide on how to create an AI agent details the safeguards to put in place right from the design stage.
My take: most teams do the opposite. They let the agent write, merge, and discover the problems in production. Torvalds's x3 is less a victory for AI than a victory for measurement. Remove step 4, and this whole commit collapses.
Assisted or written? The line this commit moves
Direct answer: this commit doesn't settle the question of "who wrote this code?". It replaces it with a better one: "who directs, who verifies, who signs?"
The binary debate — AI code good or bad, accepted or banned — misses the point. Torvalds's message shows you can be granular: the agent did this, the human did that, and every claim is verifiable. Compare that with common practice: an "AI-generated" tag slapped on as a disclaimer across thousands of lines, with no detail whatsoever. No contest.
The question the kernel community will now ask: if the agent wrote the code but the human directed, reviewed, measured, and signs alone — who is the author? Torvalds's answer is implicit: the one who signs. Responsibility doesn't get diluted by tooling. It's probably the only tenable position in a project where a regression affects billions of machines.
And this commit doesn't arrive in a vacuum: Google is pushing Antigravity 2.0, its agent-first suite built around the same pattern, and on the open-source side, Qwen3-Coder-Next is taking aim squarely at Claude Sonnet 4.6 with only 3B active parameters. What Torvalds is validating is the pattern — not any single tool. Today's agentic leaderboards, dominated by GPT-5.5, Gemini 3 Pro Deep Think and Claude Opus 4.7, show the raw material has been there for a while. What was missing was the protocol.
What this changes for your team — and what it doesn't
Direct answer: for most teams, the lesson of this commit isn't technical, it's organizational.
What changes:
- The taboo is falling. When the field's highest authority figure credits an agent on kernel code, the argument "we don't put AI in critical infrastructure" is no longer tenable.
- An attribution format to copy. Name the tool, describe precisely what it did, describe what the human kept. It's verifiable, honest, and it protects everyone — including the agent.
- The culture of measurement. An agent that codes without a benchmark to validate it is just a plausible code generator. Torvalds's commit puts measurement on the same level as the code.
What doesn't change:
- The kernel's rules. Signed-off-by, maintainer review: nothing suggests any loosening whatsoever. Torvalds is playing by the existing rules, not rewriting them.
- The obligation to understand what you sign off on. This workflow requires an expert capable of directing and reviewing the work — not a junior who accepts the diff and prays.
- Microbenchmark ≠ production. Your workload isn't "8 threads, 16 bytes, same file". Measure yours before drawing conclusions.
Towards a merge in Linux 7.4?
Direct answer: nothing is decided yet — the branch is experimental, with no announced release target, and Phoronix only mentions a possible merge window for Linux 7.4.
The commit message itself gives no destination. The patches could be reworked, postponed, or outright abandoned after review — that's the normal fate of experimental code, regardless of its author or its assistant. Status as of today: still out of mainline.
What survives the merge or the abandonment, on the other hand, is the precedent. Even if these 8 patches never go anywhere, the commit phrase will remain in the git archives as the first public endorsement of the "agent codes, human directs and measures" workflow at the very top of the Linux project. And that, no merge window can take away.
❌ Common Mistakes
Mistake 1: "AI rewrote the Linux kernel"
What's wrong: viral headlines reduce the story to "Linux written by an AI". The reality: 8 targeted patches on a specific path, directed, reviewed, measured, and signed by the most experienced human in the field. The solution: cite the commit message, not the headline.
Mistake 2: Generalizing the x3 to all your file accesses
What's wrong: the benchmark measures the worst-case contention scenario (16 bytes, 8 threads, same file), designed precisely to expose the bottleneck. Your real reads, larger and less concurrent, will see a much smaller gain. The solution: benchmark your own workload before making any architectural decision.
Mistake 3: Believing it's merged into mainline
What's wrong: the branch is experimental, living in Torvalds' tree, with no release target. No stable kernel contains these changes today. The solution: follow the branch log and the Linux 7.4 window to see where it's headed.
Mistake 4: Copying the tool without copying the discipline
What's wrong: teams that pull the agent off the shelf, merge without review or measurement, then invoke Torvalds to justify themselves. The solution: reproduce the full protocol — human framing, review, benchmarks on real hardware, an owned signature. The tool without the protocol is worthless.
❓ Frequently Asked Questions
Are the patches written with Claude Code in Linux?
No. The noref-filemap-read-with-llm branch is experimental, pushed to Torvalds' tree around October 12, 2026, with no release target in the commit message. Phoronix mentions a possible merge window for Linux 7.4. Until the merge happens, no stable kernel carries these changes.
What is the exact performance gain?
On Torvalds' Core i7-8565U laptop (CPU mitigations disabled): 16-byte reads by 8 threads on a single file, going from ~10 M to 30-33 M reads/s — a threefold increase. With 4 threads on separate cores: from ~9-12 M to 25-26 M reads/s. These are deliberately extreme microbenchmarks, not real-world workload averages.
Did Claude Code work alone?
No, and that's the key point: "under my direction". The agent produced the code and the test programs, assisted with the review, and wrote the first draft of the text. Torvalds directed the work, ran the measurements on his machine, and signed the result under his own name. Final responsibility remains explicitly human.
Which AI model runs inside Claude Code?
The commit doesn't specify the model version, only the tool. Claude Code is powered by Anthropic's Claude models, whose current flagships for agentic coding are Claude Opus 4.7 (Adaptive) and Claude Sonnet 4.6. To see how Claude stacks up against its main rival, our comparison Claude vs ChatGPT details their strengths in agentic contexts.
Should we conclude that AI-generated code is now accepted everywhere?
No. What Torvalds endorses is a protocol: human direction, review, measurement on real hardware, accountable sign-off. Without those safeguards, the same tool produces plausible but unverified code. The lesson isn't "AI can write kernel code", but "an expert can direct an AI on kernel code" — and that nuance changes everything.
✅ Conclusion
Eight experimental patches, a 3x on a microbenchmark, and above all a commit message that does more to clarify AI-assisted code than months of debate: the agent produces, the human directs, measures, and signs off. To choose the agent suited to your own workflow, start with our selection of the best AI tools of the moment.