Linus Torvalds used Claude Code to develop Linux kernel patches
Tech

Linus Torvalds used Claude Code to develop Linux kernel patches

TechNews Editorial
TechNews EditorialOct 14, 2026 · 2 min read
Share

Why it matters

Torvalds’s test shows faster reads for a specific workload, while unresolved kernel issues show the patches are not ready for mainline.

The facts

  • Linus Torvalds used Claude Code under his direction to develop an eight-patch Linux kernel series.
  • In one eight-thread small-read test, throughput rose from about 9.9–10.4 million to 30–33 million reads per second.
  • As of Oct. 13, the branch was outside mainline Linux 7.3-rc6, with reclamation and regression issues unresolved.

Advertisement

Linus Torvalds has used Claude Code to help develop an eight-patch series for the Linux kernel. The patches target a slowdown when multiple threads make small reads from the same file. They are available on the noref-filemap-read-with-llm branch of his repository, outside the mainline kernel.

Torvalds described the assistant’s role in his Git submission: “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 patches reduce contention during reads

The slowdown occurs in Linux’s page cache, which keeps file data in memory. Threads reading small amounts from the same cached file repeatedly update a reference count for the memory holding that data. Those atomic writes make processor cores compete over a shared cache line. The issue has been known since 2024, but earlier attempts to fix it did not succeed.

In one test on a four-core, eight-thread Intel Core i7-8565U laptop, eight threads made 16-byte pread() calls against the same page. The shared cache line accounted for 99.92% of measured cross-core load, according to Hit in Modified cache line (HITMs) measurements.

Read nextAnthropic adds defenses against Claude distillation attacks

The proposed change delays reuse of memory removed from the page cache until a read-copy-update (RCU) grace period ends. A reader protected by an RCU read-side section can then copy data into a user buffer without taking a reference to the memory holding the file data.

In that test, eight-thread throughput increased from about 9.9–10.4 million reads per second to 30–33 million. Kernel cycles per read fell from roughly 2,950 to 725. Single-thread reads improved from about 452–454 to 408–409 cycles per read. The results describe this specific small-read workload on Torvalds’s laptop, which he had in Prague at Linux Plumbers. They do not measure Linux-wide performance. Torvalds wrote in his pull request: “A machine with more CPUs, or more than one socket, should gain more; nothing bigger has been measured.”

Linus Torvalds seated on stage during an interview.
Photo: Krd / CC BY-SA 4.0, via Wikimedia Commons

Kernel issues remain unresolved

The faster read path has costs. Delayed memory reuse can leave pages unavailable while the kernel waits for an RCU grace period. Torvalds called reclamation “the part of this series that is least solved.” A read into a user page that is not yet mapped also incurs an extra failed exception before falling back to the existing path.

Torvalds’s use of Claude Code follows a gradual change in how he talks about AI. In December 2023, he said, “I see AI as a tool that can help us be better at what we do,” with an interest in finding bugs. By late 2025, he called himself “a huge believer in AI as a tool” and discussed code maintenance and patch review. In January 2026, he tried AI-assisted coding for a Python audio visualizer in a hobby project.

After a conversation with Dirk Hohndel at Open Source Summit Europe in Prague, reported Oct. 9, Torvalds said he now liked using AI for programming. He also cautioned, “I think that you need to be very careful using AI when you’re doing something real and important.” As of Oct. 13, the branch remained outside mainline Linux 7.3-rc6. The next work is to address the reclamation issue and the unmapped-page regression; no merge timetable has been announced.

Newsletter

Get the best AI & tech news daily

A concise daily digest. Unsubscribe anytime.

We use your email only to send this newsletter.

Keep reading