Skip to content

ProductNot yet confirmed elsewhere1 publisher2 min readPublished

Torvalds says Claude Code largely wrote his Linux page-cache patches

Linus Torvalds says Claude Code largely wrote Linux page-cache patches that cut kernel cycles per read from about 2,950 to 725 in his test. The branch was still outside mainline 7.3-rc6 on October 13, so the kernel has not yet taken the code.

The Product Desk

How we use AISend a correction

Photograph accompanying Torvalds says Claude Code largely wrote his Linux page-cache patches
Photo: phoronix.com
Kernel cycles per read fell in Torvalds's test Kernel cycles per read and reads per second with eight threads, from Torvalds's test results as reported by ZDNET.

With eight threads in Torvalds's test, kernel cycles per read fell from roughly 2,950 to 725, and throughput rose from approximately 9.9-10.4 million reads per second to 30-33 million.

Kernel cycles per read fell in Torvalds's test
FigureValueNoteClaim
Kernel cycles per read fell to, eight threads725 cycles7
Kernel cycles per read fell from, roughly2,950 cycleseight threads, same test7
Eight-thread reads per second, low end30 million reads/srange 30–33 million; was about 9.9–10.4M7

What happened

  • The patches target the page cache, where threads repeatedly reading small amounts from one cached file contend over a shared cache line that holds reference counts.
  • The contention has been a known issue since 2024, and earlier attempts to fix it came to naught.
  • The series defers reuse of memory removed from the page cache until an RCU grace period has elapsed, so a reader can copy data to a user buffer without taking a folio reference.
  • Reads that target a user page not yet mapped get slower, because the new path takes an extra failed exception before falling back to the existing code.

Why it matters

  • constraint Anyone sizing a server fleet from this result is extrapolating, because the only measurement is one four-core laptop running one small-read workload.
  • cost Memory-tight systems would bear the cost of the design, since deferred reuse can leave pages unavailable until an RCU grace period passes.
  • decision Reviewers get a disclosure that names the model and the work it did, so the open call is technical: whether deferred reuse is an acceptable price for the faster read path.

The test behind those numbers is small. Torvalds ran it on a four-core, eight-thread Intel Core i7-8565U laptop, the one he had with him in Prague at Linux Plumbers [10]. Eight threads issued 16-byte pread() calls against the same page, and the shared cache line accounted for 99.92% of the measured cross-core load [5].

With the patches, eight-thread throughput rose from roughly 9.9 to 10.4 million reads per second to 30 to 33 million [7]. That is a gain of about 2.9 to 3.3 times [16]. Kernel cycles per read fell from roughly 2,950 to 725, a factor of about 4.1 [7][17]. A single thread gained about 10%, going from about 452-454 cycles to 408-409 [8][18]. ZDNET was blunt that this does not mean Linux as a whole runs three times faster [10]. In his pull request, Torvalds wrote: "A machine with more CPUs, or more than one socket, should gain more; nothing bigger has been measured." [9]

The reclamation side is unfinished. Torvalds described it as "the part of this series that is least solved" [12]. ZDNET said whether the series will ever be merged, and on what timetable, remains up in the air [15].

The disclosure is specific. In his Git submission Torvalds 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." [2] The sentence names the model and the kinds of work it did, and it puts the human in the position of director.

ZDNET reads the move as the last step in a long change of attitude [21]. In December 2023 Torvalds said, "I see AI as a tool that can help us be better at what we do," and his interest then was in finding bugs, not writing code [19]. By late 2025 he was calling himself "a huge believer in AI as a tool" [20].

So far the record holds one branch with a disclosure, one benchmark and no merge. In our view, acceptance would show in how reviewers handle the reclamation question and in the merge itself.

For a team writing its own rule on AI-assisted patches, this series suggests two checks on any submission. The first is whether the disclosure says which parts the model did. The second is whether the author says what is unmeasured and unsolved. A submission that passes both can be checked by a reviewer. One that passes only one leaves the reviewer taking the author's word on the other half. Torvalds's series passes both [2][9][12].

What to watch

  • Whether the branch lands in a mainline release candidate, and what reviewers say about reclamation before it does.
  • Measurements on machines with more CPUs or more than one socket, which Torvalds wrote should gain more.
  • Whether the regression on reads of not-yet-mapped user pages is fixed or accepted as a cost.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence50
Adoption5
Hype gap+30
Incentives
Insufficient
Confidence55
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    Torvalds released a set of patches that were largely written with Anthropic's Claude Code.

    ReportedSupportedSource: ZDNETView cited source
  2. [2]

    In his Git submission, Torvalds 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."

    ReportedSupportedSource: Linus Torvalds, Git submission, as quoted by ZDNETView cited source
  3. [3]

    The fix addresses contention in Linux's page cache: when several threads repeatedly read small amounts of data from the same cached file, they take and release references to the backing folio, and those reference-count updates require atomic writes to a shared cache line, which forces processor cores to compete over it.

    ReportedSupportedSource: ZDNETView cited source

Sources

1 independent publisher whose own reporting we read for this story.

  1. zdnet.com

    1 article · October 13, 2026

    Linus Torvalds is using AI to develop Linux kernel code now

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories