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
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.
| Figure | Value | Note | Claim |
|---|---|---|---|
| Kernel cycles per read fell to, eight threads | 725 cycles | 7 | |
| Kernel cycles per read fell from, roughly | 2,950 cycles | eight threads, same test | 7 |
| Eight-thread reads per second, low end | 30 million reads/s | range 30–33 million; was about 9.9–10.4M | 7 |
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
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
Torvalds released a set of patches that were largely written with Anthropic's Claude Code.
- [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."
- [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.
- [4]
The contention has been a known issue since 2024, and earlier attempts to fix it came to naught.
- [5]
Torvalds found that when eight threads issued 16-byte pread() calls against the same page on a four-core, eight-thread Intel Core i7-8565U laptop, the shared cache line accounted for 99.92% of the measured cross-core load, according to Hit in Modified cache line (HITM) counts.
- [6]
The patches defer reuse of memory removed from the page cache until a read-copy-update (RCU) grace period has elapsed, which lets a reader protected by an RCU read-side section copy data directly into a user buffer without taking a folio reference.
- [7]
Eight-thread throughput rose from approximately 9.9-10.4 million reads per second to 30-33 million, while kernel cycles per read fell from roughly 2,950 to 725.
- [8]
Single-thread reads improved from about 452-454 cycles to 408-409 cycles per read.
- [9]
Torvalds added in his pull request that "A machine with more CPUs, or more than one socket, should gain more; nothing bigger has been measured."
- [10]
The results describe a particular small-read workload on Torvalds's personal laptop, which he had with him in Prague at Linux Plumbers; they do not mean Linux as a whole runs three times faster.
- [11]
Delaying memory reuse means pages can remain unavailable while the kernel waits for an RCU grace period.
- [12]
In his Git submission, Torvalds described the reclamation issue as "the part of this series that is least solved."
- [13]
There is a regression when a read targets a user page that is not yet mapped: the new path incurs an additional failed exception before falling back to the existing implementation.
- [14]
As of Oct. 13, the branch remained outside the mainline Linux 7.3-rc6.
- [15]
Whether the series will ever be merged, and on what timetable, remains up in the air.
- [16]
Eight-thread throughput gain is about 2.9 to 3.3 times.
- [17]
Kernel cycles per read fell by a factor of about 4.1.
- [18]
Single-thread cycles per read fell by about 10%.
- [19]
In December 2023 Torvalds said, "I see AI as a tool that can help us be better at what we do." At the time his interest in AI was in how it could help identify bugs, not in writing code.
ReportedContestedSource: Linus Torvalds (December 2023), as quoted and characterized by ZDNETView cited source - [20]
By late 2025, Torvalds was calling himself "a huge believer in AI as a tool."
- [21]
ZDNET described the patches as the final step in Torvalds moving closer to favoring AI and embracing it for Linux development.
Sources
1 independent publisher whose own reporting we read for this story.
- zdnet.comLinus Torvalds is using AI to develop Linux kernel code now
1 article · October 13, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- Linux KernelFollow
- AI-Assisted CodingFollow
- Kernel performanceFollow