Key Takeaways
- Torvalds released a set of patches substantially written with Anthropic’s Claude Code, an LLM-assisted coding tool.
- The patches address a long-standing memory cache contention issue that causes slowdowns on multi-core systems.
- This marks the culmination of Torvalds’ gradual shift from AI skepticism to actively using AI in Linux kernel development.
Linus Torvalds has made a significant move in the history of open-source development: he has used artificial intelligence to write code for the Linux kernel. Over the past few years, Torvalds’ perspective on AI has evolved from skepticism to recognizing its value as a programming aid—and now, to using it directly for kernel development.
In his Git submission, Torvalds stated, “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.”
Tackling a Shared-Memory Bottleneck
The patches target a specific performance issue in Linux’s page cache, which stores file data in memory. When multiple threads repeatedly read small amounts of data from the same cached file, they constantly acquire and release references to the underlying data structure. Each of these reference-count updates requires an atomic write to a shared cache line, forcing multiple processor cores to contend for access to the same memory location.
While this may sound minor, the impact can be severe under certain workloads. Torvalds discovered that on a four-core, eight-thread Intel Core i7-8565U laptop, eight threads issuing 16-byte pread() calls against the same cached page spent 99.92% of their cross-core load on that single shared cache line—measured via Hit in Modified cache line (HITMs) metrics. The contention dramatically reduces throughput.
This is not a theoretical concern: the page-cache contention problem has been documented since 2024, and previous attempts to resolve it had not succeeded. Torvalds and Claude Code’s approach changes how the kernel reuses memory removed from the page cache. Instead of returning that memory to the allocator immediately, the patches defer reuse until after a read-copy-update (RCU) grace period has elapsed. This allows a reader protected by an RCU read-side section to copy data directly into a user buffer without taking a reference on the cached data structure.
The strategy trades immediate memory reclamation for a read path that avoids repeatedly updating a shared reference counter. Benchmark results show meaningful gains in the specific test environment: eight-thread throughput increased from approximately 9.9–10.4 million reads per second to 30–33 million reads per second, while kernel cycles per read dropped from roughly 2,950 to 725. Single-threaded reads also improved, from about 452–454 cycles to 408–409 cycles per read. Torvalds noted in his pull request that machines with more CPUs or multiple sockets would likely see even greater benefits, though nothing larger has been measured.
Faster Reads, Unfinished Memory Management
It would be an overstatement to claim that Linux as a whole now runs three times faster. These results reflect a specific, experimental workload on Torvalds’ personal laptop, tested during the Linux Plumbers conference in Prague. The patches are not yet production-ready.
The performance improvements come with engineering trade-offs. Delaying memory reuse means pages may remain unavailable while the kernel waits for an RCU grace period to elapse. In his Git submission, Torvalds described this reclamation challenge as “the part of this series that is least solved.”
Additionally, a regression exists when a read targets a user page that has not yet been mapped. The new code path incurs an extra failed exception before falling back to the existing implementation. As of October 13, the branch remained outside the mainline Linux 7.3-rc6. Whether and when these patches will be merged into the main kernel remains uncertain.
From AI Skepticism to Hands-On Use
Torvalds’ adoption of Claude Code represents the culmination of a gradual evolution in his stance toward artificial intelligence—a process that has been more nuanced than a simple reversal from opposition to support.
In December 2023, he described AI as a potential aid to developers, stating, “I see AI as a tool that can help us be better at what we do.” At that time, his interest focused on using AI to identify bugs rather than write code. The idea of AI generating serious production programs was not yet widely considered.
By late 2025, Torvalds had become “a huge believer in AI as a tool,” expressing interest not only in bug detection but also in code maintenance and patch review. Generating entirely new, serious code for the Linux kernel remained largely unexplored territory. Even in January 2026, he began experimenting with AI-assisted coding only for a hobby project—a Python audio visualizer.
His most recent remarks, made in early October during a conversation with Dirk Hohndel at Open Source Summit Europe in Prague, reflected heightened enthusiasm. “I used to think it was just not very good—but now I’m at the point where I actually really like using AI,” Torvalds said. “I think AI is a wonderful tool if you use it correctly and treat it as a tool, and I find it makes programming much more enjoyable.”
At the same time, he emphasized caution: “I think that you need to be very careful using AI when you’re doing something real and important.” Few projects carry the weight and importance of the Linux kernel.
The page-cache experiment illustrates both sides of Torvalds’ position. Claude Code contributed kernel code, test programs, and review materials. The resulting branch demonstrates promising benchmark improvements, but also reveals unresolved memory-reclamation questions and a performance regression that must be addressed before the code could be considered for the mainline kernel.
Regardless of the outcome, a turning point has been reached. Torvalds—arguably the world’s most prominent developer and maintainer—is now using AI to create new Linux kernel code. Not long ago, this would have been unthinkable, and even today, many in the industry struggle to imagine AI contributing substantive code to critical infrastructure projects like Linux.
Also Read
- Nature’s Invisibility: How Animals Defeat Light Like Superpowered Heroes
- GTA 6 will reportedly launch on PC in early 2027, and fans believe it’s so Rockstar can avoid clashing with ‘the PS5 emulator breathing down their necks’
- Complex Mode Interactions in Lightly Damped Structures: Understanding Two‑Mode Coupling and Eigenvalue Behavior
- Apple’s HomeView Smart Display Opens for Preorders Ahead of November Launch


