Skip to content

Build Not yet confirmed elsewhere1 publisher 2 min read Published

Torvalds' page-cache patches hit 23x on a Threadripper before reviewers found a race

Linus Torvalds submitted Claude Code-assisted patches that lift synthetic page-cache reads 23-fold, to 304 million a second. He warned real workloads will gain far less, and reviewers have since reported a race condition.

The Engineer · Build desk

Send a correction

Cycles per read fell on Threadripper and laptop Cycles per read before and after the patches in Torvalds' benchmarks, on his 64-thread Threadripper and in eight-thread tests on his laptop.

Key figures: on the 64-thread Threadripper, cycles per read fell from nearly 20,000 to 735. On Torvalds' laptop, eight-thread kernel cycles per read fell from roughly 2,950 to 725. Peak laptop throughput rose by a factor of about 3.3.

Cycles per read fell on Threadripper and laptop
FigureValueNoteClaim
Threadripper cycles per read, 64 threads735 cyclesdown from nearly 20,00011
Laptop kernel cycles per read, eight threads725 cyclesdown from roughly 2,95012
Laptop peak gain, about3.3 times20

What happened

  • Torvalds said Claude Code wrote the implementation, tests and initial documentation for the first eight-patch series and reviewed the code under his direction, and that he ran the benchmarks himself.
  • On his laptop, the original eight-patch branch took eight-thread reads from 10 million to as many as 33 million per second.
  • On the 64-thread Threadripper, kernel cycles per read fell from nearly 20,000 to 735.
  • Kiryl Shutsemau, who had worked on the same bottleneck before, identified a race in filemap_read_rcu_batch(), and Torvalds has handed him further development.

Why it matters

  • What it limits constraint Development now sits with Shutsemau, so the 23x is a benchmark result on a series still being revised.
  • What it costs cost The first implementation took a 16-byte single-thread read from about 4,150 to 6,550 cycles, roughly 58% more. A single-thread reader has no contention to relieve, so it only sees the extra cost.
  • Who has to decide decision Maintainers taking AI-written patches into reclamation code need reviewers who know the subsystem. Here the race surfaced after submission, from a reviewer who had worked on the problem.

The patches remove folio reference-count operations from a common buffered-read path [18]. That path was the cost. In eight-thread tests on Torvalds' laptop, Hardware Busters reports, folio reference-count contention made up 99.92% of cross-core load HITMs [13]. Matthew Wilcox, an Oracle engineer, flagged the bottleneck in 2024 after it surfaced in a customer workload [6].

Dropping the reference count creates its own problem. Something else has to keep the folio from being freed or replaced during the copy. Earlier approaches copied data without holding a reference and checked validity afterward, which left races involving reclamation and replacement [8]. The rcu-free-v3 series sets a PG_rcu_free flag and delays reclamation with RCU, so the folio survives the userspace copy, provided the copy does not fault [9].

The fault case is the seam. In the first implementation, reads into unmapped user pages took an extra fault before falling back to the existing path [21]. Whether that cost persists in rcu-free-v3 is unclear [22].

Divide 304 million by 13.3 million and the factor is 22.9 [19]. Both numbers come from one 64-thread Threadripper under heavy contention [10]. The laptop's first branch went from 10 million to a peak of 33 million, or 3.3x [20]. The machines, thread counts and patch revisions differ, so the pair is not a scaling curve. For 23x to transfer, a workload would need many cores reading the same cached files at once through this path, with destination pages already mapped. The report does not include a measurement from the customer workload that started the work.

The reclamation design drew objections. Wilcox questioned the flag and proposed a page type instead, plus reclaiming inactive-list folios after an RCU grace period [14]. Torvalds rejected both. He argued that the flag has to be in place for as long as userspace can still map the folio, and that truncate and hole-punch operations fall outside what inactive-list reclamation would handle [15]. Hildenbrand, an Arm engineer and memory-management maintainer, supported Shutsemau's suggestion to restrict the flag to 64-bit systems [16].

In our view the evidence supports a narrow reading of the human-review point. The human baseline is not clean: Torvalds spent 18 months running a broken version of his own fix, and other developers hit problems with theirs [5]. Reclamation and replacement races, the class that defeated those attempts, also reached review in this series [3]. The evidence does not show that AI-written code fails more often than human-written code. The report's description of the race breaks off mid-sentence, so how it triggers is not established here.

What to watch

  • Whether Shutsemau's revision fixes the race in filemap_read_rcu_batch() and limits PG_rcu_free to 64-bit systems.
  • Whether rcu-free-v3 still adds the extra fault cost to single-thread reads into unmapped pages.
  • Any measurement on the customer workload Wilcox flagged in 2024, which would show the real-world gain Torvalds said would be smaller.

Clarity's read

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

Reality

Evidence50
Adoption
Not scored
Hype gap+30
Incentives
Not scored
Confidence60
Why these scores

Claim ledger

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

  1. [1]

    Linus Torvalds submitted a 10-patch series that delivered a 23-fold throughput improvement in a synthetic benchmark running on his Ryzen Threadripper.

    Reported SupportedView cited source
  2. [2]

    Torvalds warned that the benchmark gains would be considerably smaller in real-world workloads.

    Reported SupportedView cited source
  3. [3]

    Reviewers have since identified a race condition and raised concerns about memory reclamation.

    Reported SupportedView cited source

Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.

Add to ChatGPTAdd to Claude

Sources

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

  1. thenewstack.io

    1 article · October 14, 2026

    Linus Torvalds let Claude Code fix the Linux page cache. Then reviewers found a race.

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.

Entities

Loading related stories