presentofai

Linus Torvalds uses Claude Code to rewrite Linux file-cache code

TL;DR

Linus Torvalds, the creator of Linux and its most skeptical voice on AI, used Claude Code to rewrite a performance-critical section of the kernel page cache and publicly credited the tool in the patch cover letter.

What happened

  • On October 12, Torvalds posted a patch series to the Linux kernel mailing list under the branch name noref-filemap-read-with-llm.
  • The cover letter states: "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 patch targets a real concurrency bottleneck: under heavy multi-thread reads, atomic reference-count operations on the page cache fight over the same cache line. The fix routes reads through an RCU read-side critical section, eliminating that contention.
  • On Torvalds' own Core i7-8565U laptop, kernel cycles per read dropped from roughly 2,950 to about 725, and throughput jumped from 9.9 million to between 30 and 33 million reads per second across eight threads.
  • Load HITMs (cache-line contention events) fell from 30,538 to 101. Single-threaded latency on an unmapped page worsened, rising from about 4,150 to 6,550 cycles, an acknowledged tradeoff.

Why it matters

  • Torvalds is not a neutral endorser: in October 2024 he called 90% of AI talk marketing hype, and in May 2026 he said AI-generated bug reports had made the kernel security mailing list "almost entirely unmanageable."
  • His July 2026 policy statement already signaled a turn: "Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it."
  • This patch goes further than policy. Torvalds directed the tool, ran the benchmarks himself, and put his name on the result, drawing a deliberate line between supervised AI output and low-quality bot-filed CVEs.
  • For Claude Code and its competitors (OpenAI Codex, Cursor), this is the most credible endorsement possible in a safety-critical, low-tolerance codebase: not a vendor quote but a merged patch with published numbers.
  • The patch targets the Linux 7.4 merge window, meaning AI-written kernel code could ship to hundreds of millions of devices if accepted.

What to watch next

  • Whether the patch clears review and lands in Linux 7.4: maintainer acceptance would set a formal precedent for AI-assisted contributions in the kernel.
  • How other senior kernel maintainers respond: if Torvalds' public attribution normalizes the practice, expect more cover letters disclosing LLM involvement across major open-source projects.
  • Whether Anthropic uses this as a commercial signal: a Torvalds endorsement in a safety-critical codebase is exactly the credibility Claude Code needs to compete in enterprise infrastructure tooling.

Originally published on Present of AI, a daily source-linked AI news timeline. Read the full timeline or browse the open dataset.