← All posts

Linus Torvalds Claude Code patch: what it actually does

2026-10-13 · 3 min read

Linus Torvalds used Claude Code to write an experimental eight-patch series that changes how Linux reads files from its page cache, and on his own laptop it roughly tripled throughput for one specific workload. It's not merged. His commit message credits the AI for the code, the test programs, the review of open issues and the first draft of the cover letter, with Torvalds directing and running the benchmarks himself.

The story hit X just after midnight Central time on Monday, when @twtayaan, a Linux news account, posted it with a link to Phoronix's write-up. The post included a fair caveat: "a place in Linux 7.4 is still unconfirmed."

What the patch changes

The branch is called noref-filemap-read-with-llm and sits in Torvalds' own kernel repository, built on Linux 7.3-rc6. The lead commit, dated October 10, is titled "mm: read from the page cache without folio references."

When a program reads a file Linux already has in memory, the kernel briefly puts a hold on that chunk of memory so it can't be freed mid-read, then releases it. That hold is a counter. When many threads read the same file at once, they all update that same counter, and the CPU cores spend their time passing it back and forth instead of doing work. Kernel developer Matthew Wilcox flagged this bottleneck in 2024 after seeing it in a customer workload.

The fix skips the hold entirely. Readers copy data under the kernel's RCU mechanism, and memory that gets evicted from the cache isn't reused until a short grace period has passed. Readers stay safe, at the cost of some memory sitting idle a little longer.

The numbers, and their limits

According to the commit and Linuxiac's breakdown, Torvalds tested on an Intel Core i7-8565U laptop with ext4 and some security mitigations turned off:

Test Before After
8 threads, 16-byte reads of one cached file ~10M reads/s ~30-33M reads/s
4 threads on separate cores ~9-12M reads/s ~25-26M reads/s
Single thread ~8M reads/s ~9M reads/s

That's a narrow microbenchmark built to hit exactly this contention, on one machine. Single-threaded reads barely move, and reporting notes some cases get slower, especially reads that miss the cache. The commit itself lists unresolved questions about memory behavior and regressions. It's a promising lead. Nobody has shown that Linux as a whole gets faster.

Why people care that it's Torvalds

In the commit message, Torvalds writes that the patches "were done with an LLM coding assistant (Claude Code) under my direction." He's the same person who called the AI industry "90 percent marketing and 10 percent reality" in 2024, and who complained this year that AI-generated bug reports were burying the kernel security list.

The same account posted a second Torvalds story later Monday. @twtayaan reports that Torvalds used LLM tools to untangle some obscure kernel code another developer had submitted a fix for, split it into smaller functions, and turned up older bugs along the way. The post's summary line: "Linus wasn't asking AI to replace his judgment." Those changes aren't in mainline yet either.

That's what I'd pay attention to. Torvalds didn't hand Claude Code a vague goal and ship whatever came back. He picked a known, measurable bottleneck, had the tool draft code and tests, measured the result himself, and wrote down what's still unproven, all on a branch nobody has to merge. We covered the kernel's disclosure and sign-off rules for AI patches last month, and this series follows them closely.

What this means for businesses adopting AI

You don't need to be Linus Torvalds to work this way. The pattern carries over: give the AI a specific, measurable problem, let it do the drafting and testing, check the output against real numbers, and keep it out of production until a person signs off. When we see an AI project disappoint, it has usually skipped the measuring or the sign-off.

If you want help picking the one process in your business where that approach would pay off first, New Face Design offers a free process audit.

08 / Start here

Which of this can you use today?

Tell us what you use today and we'll reply within one business day with what it would take. Free, 20 minutes, no pitch deck.

Email

pgorski@newfacedesign.com

Phone

+1 (773) 627-2176

Based in

Chicago area

Working with clients everywhere

Skip the form: grab a 20 minute slot.

Open the calendar →