Torvalds Builds Linux Page-Cache Patches With Claude Code

Linus Torvalds has written an eight-patch Linux kernel series with Anthropic’s Claude Code, and said so in the series itself. In the description on his branch noref-filemap-read-with-llm, dated 10 October 2026, he wrote: “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.”

Each of the eight patches carries the line “Assisted-by: LLM” next to his sign-off. The series changes how Linux reads cached files, and on his laptop it cut the kernel cycles per read from about 2,950 to about 725 when eight threads read the same file.

Business Pill · VERIFICATION COST

A one-minute explainer of verification cost: what is cheap to make is not always cheap to check. It teaches the general idea only and says nothing about any person or organisation in this story.

The key insight: As we read it, the notable part is what Torvalds kept for himself: the direction and the measurements. His text says Claude Code did the code, the tests, the review behind his list of problems and the first draft of the description, under his direction, and that the measurements were run on his own machine.

What the Patches Change

The problem Torvalds describes is contention: “Small reads of one file from many threads contend on the folio refcount”. Each read takes a reference to the cached page and drops it again, so every read writes the same memory twice. He says Matthew raised it in 2024 from a customer workload.

His fix rests on one rule, which he sets out on its own line: “A folio removed from the page cache goes back to the page allocator only after an RCU grace period.” With that rule, a reader can copy straight from the cached page without taking a reference.

He says earlier attempts copied into a stack buffer and checked the result afterwards, and stopped at cases the check could not see. “Deferring the free removes those cases instead of detecting them.”

Kernel cycles per 16-byte read of one page on Linus Torvalds’s laptop, before and with his patch series,
Kernel cycles per 16-byte read of one page on Linus Torvalds’s laptop, before and with his patch series, for one thread, four threads on four cores and eight threads. Each bar is the midpoint of the range in his series description of 10 October 2026.

What He Measured

The numbers come from one machine. Torvalds lists an i7-8565U laptop with 4 cores and 8 threads, and writes “My laptop only”. Because the laptop throttles on temperature, he asks readers to compare the cost per read, not reads per second.

With 8 threads doing 16-byte reads of one page, kernel cycles per read fell from 2,937 to 2,975 before the series to 725 to 726 after it, and reads per second rose from 9.9 to 10.4 million to 30 to 33 million. With one thread, cycles per read fell from 452 to 454 to 408 to 409.

Load HITMs, which count loads that hit a cache line another core has modified, fell from 30,538 to 101 with 8 threads. He adds that all the laptop’s cores share one L3 cache, and that “nothing bigger has been measured.”

What He Says Is Not Solved

The series description ends with ten known problems under the heading “Known problems, and what I’d like eyes on”. The first is that pages waiting for a grace period are invisible to the memory allocator.

He writes that it “ran a machine out of memory” in a reproducer by Kiryl Shutsemau, and that patches 7 and 8 keep the waiting lists short without making the allocator see them. He also writes: “That is a regression for CMA as the series stands.” CMA is the kernel’s contiguous memory allocator.

On testing he is plain: “Those, a gcc build of one x86-64 config, and running the laptop on it, are all the testing there is.” He lists xfstests, KASAN, lockdep, 32-bit builds and other machines among what has not been run.

Bar chart: lines added plus removed in each of the eight patches, from 12 to 176; patch 5, the read path, is the largest
Lines added plus lines removed in each of the eight patches of the series, by Torvalds’s patch numbers; our count from the repository on 12 October 2026.

Where the Code Sits

The patches are on a branch of Torvalds’s own repository on kernel.org, not in the main line. Phoronix spotted the branch on 12 October and noted that Torvalds usually hosts only the master branch there. Our check of the repository found that the series is not in master as of Linux 7.3-rc7, which he tagged on 11 October.

By our count from the repository, the eight patches change 14 files, adding 446 lines and removing 60, on a base he describes as “7.3-rc6 plus fixes”.

The Structural Read

As we read it, the series description is also an unusually frank piece of review: ten numbered problems, several of them open, under the heading “Known problems, and what I’d like eyes on”.

As we read it, the “Assisted-by: LLM” line on each patch is the disclosure, and it sits next to his own sign-off on every one of them.

The work is still a branch in his repository; Phoronix noted that he usually hosts only the master branch there.

Linus Torvalds, series description on noref-filemap-read-with-llm, 10 October 2026

“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.”

Three Implications

KERNEL DEVELOPERS The series asks for review of ten listed problems, including memory the allocator cannot see and what he calls a regression for CMA.

READERS OF THE NUMBERS Every figure is from one laptop, an i7-8565U with 4 cores and 8 threads; he writes that nothing bigger has been measured.

ANYONE TRACKING AI IN OPEN SOURCE Each of the eight patches carries the trailer Assisted-by: LLM next to Torvalds’s sign-off.

The Business Engineer Lens

This story maps onto the Business Engineer framework The Agentic Harness War.

The framework puts it this way: “As execution delegates, human effort moves to delegation, supervision, review, and integration, and the returns to domain expertise rise.”

As we read it, Torvalds’s series is that pattern at the top of the kernel: the assistant drafted and tested, and the person with three decades of the code’s history directed it, measured it and listed what is still wrong.

What Is Not Established

The texts we read do not say how much of the code Claude Code wrote line by line, or how much Torvalds rewrote. They give no date for a merge, and his own list of known problems includes what he calls “a regression for CMA as the series stands”. Every performance figure is from his single laptop.

Business Engineer Framework

The Agentic Harness War

A Business Engineer framework on why the harness around a model, and the human role in it, decides what agents can do.

Read the Map of AI →

The Bottom Line

Linus Torvalds has built a kernel series with Claude Code, saying in his own words that the code, the tests, the review and the first draft of the description were done with it under his direction. On his laptop the cost of a contended small read fell by about three quarters, by our arithmetic, and his own list of ten open problems says the work still needs review.

95,000+ executives read Business Engineer for the AI strategy frameworks cited by ChatGPT, Claude, and Perplexity.

A note on sourcing. On 12 October 2026 we fetched Linus Torvalds’s branch noref-filemap-read-with-llm from kernel.org with git and read every commit message in it, including the full series description, which is the source of every quotation and figure here. The performance numbers are his, from his own laptop. The line and file counts and the check against the master branch are ours, from the same repository.

We used Phoronix’s report of 12 October only for the fact that it spotted the branch. Nothing here is a forecast or investment advice.

Sources: Torvalds, series description (commit 4c0f36971, 10 Oct 2026) · The noref-filemap-read-with-llm branch on kernel.org · Phoronix, 12 Oct 2026

Scroll to Top

Discover more from FourWeekMBA

Subscribe now to keep reading and get access to the full archive.

Continue reading

FourWeekMBA