<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo" -->

---
title: Linus Torvalds let Claude Code fix the Linux page cache....
description: Linus Torvalds used Claude Code to generate a 10-patch series addressing a long-standing Linux page cache reference-counting bottleneck, achieving up to 23x...
canonical: https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Linus Torvalds let Claude Code fix the Linux page cache. Then reviewers found a race. | daily.dev
og:description: Linus Torvalds used Claude Code to generate a 10-patch series addressing a long-standing Linux page cache reference-counting bottleneck, achieving up to 23x...
og:url: https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo
og:image: https://api.daily.dev/og/posts/WEUdLOReo.png
og:image:alt: Linus Torvalds let Claude Code fix the Linux page cache. Then reviewers found a race.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

**[The New Stack](https://daily.dev/sources/newstack)** · 4 min read · 0 upvotes · 0 comments

## Summary

Linus Torvalds used Claude Code to generate a 10-patch series addressing a long-standing Linux page cache reference-counting bottleneck, achieving up to 23x throughput gains in synthetic benchmarks on his Threadripper system. Claude wrote the implementation, tests, and documentation under Torvalds' direction, while he ran benchmarks himself. Kernel reviewers, including Matthew Wilcox and Kiryl Shutsemau, subsequently found a race condition in filemap_read_rcu_batch() and raised concerns about the new PG_rcu_free flag's memory reclamation design, leading Torvalds to hand off further development to Shutsemau. The patches have not yet merged as review and design debate continue.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thenewstack.io/torvalds-claude-code-kernel>

## Questions this post answers

### What performance improvement did Linus Torvalds get from his Claude Code-assisted Linux page cache patch?

The revised rcu-free-v3 patch series delivered up to a 23-fold throughput improvement in a synthetic benchmark, pushing eight-thread reads from 13.3 million to 304 million reads per second on a 64-thread Threadripper, while cutting cycles per read from nearly 20,000 to 735. Torvalds warned real-world workloads would see smaller gains.

_Developers evaluating AI-assisted kernel work can follow this page cache patch's review on daily.dev._

### What race condition did reviewers find in the Linux kernel page cache patch written with Claude Code?

Kiryl Shutsemau identified a race in filemap_read_rcu_batch() where folio replacement followed by an extension of i_size could expose data that was never written. Torvalds recommended moving the file-size read earlier and consolidating folio checks, which Shutsemau then incorporated into a revised patch still under review.

_Kernel engineers tracking memory-reclamation edge cases can follow this fix's progress on daily.dev._

### How did Linus Torvalds use Claude Code to write a Linux kernel patch?

Torvalds had Claude Code write the implementation, tests, and initial documentation for a page-cache reference-counting fix, reviewing the code himself and running the benchmarks personally. The work appeared on an experimental branch named noref-filemap-read-with-llm in his tree, replacing an approach he had struggled with unsuccessfully for 18 months.

_Developers weighing AI coding assistants for systems-level work can track real outcomes like this on daily.dev._

## Similar posts on daily.dev

- [Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs](https://daily.dev/posts/linus-torvalds-did-what-i-preach-used-ai-to-make-code-decipherable-uncovered-more-bugs-tsqqcmos3) · Phoronix · 1 upvotes · 0 comments
- [Claude Code Found a Linux Vulnerability Hidden for 23 Years](https://daily.dev/posts/claude-code-found-a-linux-vulnerability-hidden-for-23-years-ty1tp2xrp) · Michael Lynch · 14 upvotes · 1 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#claude-code](https://daily.dev/tags/claude-code)

[View this post on daily.dev](https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Linus Torvalds let Claude Code fix the Linux page cache. Then reviewers found a race.","url":"https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo"},"datePublished":"2026-10-14T23:06:20.864Z","dateModified":"2026-10-15T10:15:12.498Z","description":"Linus Torvalds used Claude Code to generate a 10-patch series addressing a long-standing Linux page cache reference-counting bottleneck, achieving up to 23x...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4f2ace3e5c5ffedb702a246b364995c2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4f2ace3e5c5ffedb702a246b364995c2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The New Stack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The New Stack","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/newstack","url":"https://daily.dev/sources/newstack"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,claude-code","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The New Stack","item":"https://daily.dev/sources/newstack"},{"@type":"ListItem","position":3,"name":"Linus Torvalds let Claude Code fix the Linux page cache. Then reviewers found a race."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/linus-torvalds-let-claude-code-fix-the-linux-page-cache-then-reviewers-found-a-race--weudloreo#faq","mainEntity":[{"@type":"Question","name":"What performance improvement did Linus Torvalds get from his Claude Code-assisted Linux page cache patch?","acceptedAnswer":{"@type":"Answer","text":"The revised rcu-free-v3 patch series delivered up to a 23-fold throughput improvement in a synthetic benchmark, pushing eight-thread reads from 13.3 million to 304 million reads per second on a 64-thread Threadripper, while cutting cycles per read from nearly 20,000 to 735. Torvalds warned real-world workloads would see smaller gains. Developers evaluating AI-assisted kernel work can follow this page cache patch's review on daily.dev."}},{"@type":"Question","name":"What race condition did reviewers find in the Linux kernel page cache patch written with Claude Code?","acceptedAnswer":{"@type":"Answer","text":"Kiryl Shutsemau identified a race in filemap_read_rcu_batch() where folio replacement followed by an extension of i_size could expose data that was never written. Torvalds recommended moving the file-size read earlier and consolidating folio checks, which Shutsemau then incorporated into a revised patch still under review. Kernel engineers tracking memory-reclamation edge cases can follow this fix's progress on daily.dev."}},{"@type":"Question","name":"How did Linus Torvalds use Claude Code to write a Linux kernel patch?","acceptedAnswer":{"@type":"Answer","text":"Torvalds had Claude Code write the implementation, tests, and initial documentation for a page-cache reference-counting fix, reviewing the code himself and running the benchmarks personally. The work appeared on an experimental branch named noref-filemap-read-with-llm in his tree, replacing an approach he had struggled with unsuccessfully for 18 months. Developers weighing AI coding assistants for systems-level work can track real outcomes like this on daily.dev."}}]}
```

