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 attacksThe 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.”

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.



