ZDNET’s key takeaways
- Torvalds just released a set of patches written primarily with Anthropic’s Claude code.
- The patches address a memory cache extension issue when using multiple cores and processors.
- This was Torvalds’ last step towards embracing AI for Linux development.
It had to happen. Linus Torvalds announced to the world that he is using AI to write code for the Linux kernel. Who thought it? Well, I for one. Over the past few years, I’ve seen Torvalds’ attitude shift from being skeptical to seeing AI as a useful tool for programmers and maintainers.
Also: Nvidia’s new Nemotron 3.5 Super VL is another step forward for US Open-weight AI
In his git submission he 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 guidance.”
Addressing a common memory bottleneck
Specifically, the fix addresses contention in the Linux page cache, which holds file data in memory. When several threads repeatedly read small amounts of data from the same cache file, they take and release references to the folio that supports that data. These reference count updates require atomic writes to a shared cache line. This in turn forces processor cores to compete over it.
Doesn’t sound like a big problem, does it? False. In some workloads it can really slow things down. Torvalds found that when eight threads issue 16-byte Pread() calls against the same page on a four-core, eight-thread Intel Core i7-8565U laptop, the common cache line has 99.92% of the measured cross-core load, according to Hit and Modified Cache Line (HITMs). That slows down the work considerably.
This isn’t just Linus scratching a personal itch. It has been a known problem since 2024. Previous attempts to fix it have come to nothing.
Torvalds and Claude Code’s proposed patches change when the kernel can remove memory from the page cache. Rather than immediately returning that memory to the allocator, patches defer reuse until a read-copy-update (RCU) grace period has expired. That lets a reader protected by an RCU read-side section copy data directly into a user buffer without taking a folio reference.
Also: Someone made a free Photoshop clone – so I had to try it on Linux
This approach involves direct memory reclamation for a read path that avoids repeated updating of a common reference counter. The reported performance gains are significant within that specific test. Eight-thread throughput increased from about 9.9-10.4 million reads per second to 30-33 million, while kernel cycles per read fell from about 2,950 to 725. Single-thread reads improved more modestly, from about 452-454 cycles to 408-409 cycles per read. Torvalds added in his pull request (PR) that “A machine with more CPUs, or more than one socket, should gain more; nothing bigger has been measured.”
This does not mean that Linux as a whole runs three times faster. Hardly! Instead, this describes experimentalrResults of a particular small-read workload on Torvald’s personal laptop, which he had with him in Prague at Linux Plumbers.
Faster reads, seamless memory management
That is not to say that Torvalds and Claude Code fixed this issue. We can’t say that for a long time. The performance gains come with engineering trade-offs. Delaying memory reuse means that pages can remain unavailable while the kernel waits for an RCU grace period. In his Git submission, Torvalds described the recovery issue as “the least resolved part of this series.”
Also: I’ve been using Ubuntu for 22 years – and 26.10 might be its best release yet
There is also a regression if a read targets a user page that has not yet been mapped. The new path throws an additional failed exception before falling back to the existing implementation. As of October 13th, the branch has remained outside of mainline Linux 7.3-rc6. Whether it will ever be merged, and on what schedule, remains up in the air.
From AI skepticism to practical use
Torvalds’ decision to use the Claude code reflects a long-term evolution in his attitude to AI. This was not a simple reversal from opposition to support.
In December 2023, he described AI as a potential help to developers, saying: “I see AI as a tool that can help us be better at what we do.” At the time, his interest in AI was around how it could help identify bugs, rather than writing code. No one seriously thought about using AI to write serious programs (hard to believe now).
By the end of 2025, Torvalds called himself “a big believer in AI as a tool, saying he was more interested not just in finding bugs, but in maintaining code and maintaining patches. Generating new, serious code for Linux was still largely off the table. Still, in January 2026, he started playing around with AI-assisted audio coding for a Python project.
Also: 75% of developers I polled prefer Claude Code – that’s why they choose it over Codex
His latest remarks, reported on October 9 after a conversation with Dirk Hohndel at the Open Source Summit Europe in Prague, were more enthusiastic.
“I used to think it was just not very good – but now I’m at the point where I really like using AI,” Torvalds said. “I think AI is a wonderful tool if you use it properly and treat it as a tool, and I think it makes programming much more enjoyable.”
Still, he warned, “I think you have to be very careful with using AI if you’re doing something real and important.” It doesn’t get much less real and important than Linux.
The page-cache experiment places both pages of its position on display. Claude Code helped produce kernel code, tests and review materials. The resulting branch shows promising benchmark gains, but also the unresolved memory reclamation issues and performance regression that need to be addressed before the experiment can become production core code.
Nevertheless, we have reached a turning point. Torvalds, arguably the world’s leading developer and maintainer, is now using AI to develop new Linux kernel code. This would have been unthinkable even a year ago, and even now some people still struggle to imagine AI adding new code to Linux or any other important program.
