Linus Torvalds, the creator and principal maintainer of the Linux kernel, has officially announced the use of an Artificial Intelligence (AI) coding assistant to develop and refine code for the world’s most significant open-source project. This milestone was revealed through a recent Git submission where Torvalds credited an LLM (Large Language Model) coding assistant, specifically Claude Code, for its role in drafting code, generating test programs, and assisting in the review process for a series of patches aimed at improving kernel performance. The submission marks a historic shift in the development of the Linux kernel, signaling that even the most rigorous systems-level programming can now benefit from the integration of generative AI tools when guided by expert human oversight.
The specific focus of this AI-assisted intervention is a persistent shared-memory bottleneck within the Linux page cache, a critical component that stores file data in system memory to accelerate read and write operations. For years, the kernel has faced performance degradation during specific high-concurrency workloads where multiple threads attempt to read small amounts of data from the same cached file. This issue, characterized by cache line contention, has long been a target for optimization, but previous attempts to resolve it had failed to provide a sufficiently robust or efficient solution.
The Technical Challenge: Contention in the Page Cache
The problem addressed by Torvalds and Claude Code involves "contention" within the kernel’s page cache. In a modern computing environment, when multiple processor threads access the same data simultaneously, the kernel must manage these accesses to ensure data integrity. In the case of the Linux page cache, threads reading from a cached file must take and release "references" to the folio—the basic unit of memory management—backing that data.
These reference-count updates necessitate atomic writes to a shared cache line. In high-performance computing scenarios, these atomic operations become a significant bottleneck. Because the processor cores must compete for ownership of the shared cache line to perform these writes, the system experiences what is known as "cross-core load." Instead of processing data, the CPU cycles are consumed by the overhead of managing memory references across different cores.
Torvalds conducted empirical testing on an Intel Core i7-8565U laptop, a quad-core, eight-thread machine. His findings revealed the severity of the bottleneck: when eight threads issued 16-byte pread() calls against the same page, the shared cache line accounted for a staggering 99.92% of the measured cross-core load. This phenomenon is documented via Hit in Modified cache line (HITM) metrics, which track how often a processor finds data in a cache line that has been modified by another processor, necessitating a slow and energy-intensive transfer of data between caches.
Experimental Methodology and Quantifiable Performance Gains
The proposed fix developed with Claude Code introduces a fundamental change in how the kernel handles memory removed from the page cache. Historically, when memory is no longer needed in the cache, it is returned to the system’s memory allocator immediately. The new AI-assisted patches defer this reuse until a Read-Copy-Update (RCU) grace period has passed.
By utilizing RCU read-side sections, the kernel allows a reader to copy data directly into a user buffer without the need to take a folio reference. This architectural shift trades immediate memory reclamation for a significantly faster read path. By avoiding the repeated updating of a shared reference counter, the kernel bypasses the primary source of cache line contention.
The data resulting from this experiment suggests a transformative improvement in specific workloads:
- Throughput: In the eight-thread test environment, throughput increased from approximately 10 million reads per second to between 30 and 33 million reads per second—a tripling of performance.
- Efficiency: The number of kernel cycles required per read operation plummeted from roughly 2,950 cycles to just 725 cycles.
- Single-Thread Performance: Even in less congested scenarios, single-thread reads saw an improvement, dropping from approximately 453 cycles to 408 cycles per read.
Torvalds noted in his pull request (PR) that the benefits are likely to scale with hardware complexity. Machines featuring higher core counts or multiple CPU sockets are expected to see even more dramatic gains, as the overhead of cache line contention typically increases with the number of participating cores.
A Chronology of Transformation: From Skeptic to Practitioner
The integration of Claude Code into the Linux kernel development process is the culmination of a multi-year evolution in Linus Torvalds’ perspective on artificial intelligence. Historically known for his pragmatic and often skeptical view of new software trends, Torvalds has gradually moved from viewing AI as a curiosity to embracing it as a professional necessity.

In late 2023, during various industry dialogues, Torvalds expressed a cautious interest in AI, primarily as a tool for "bug hunting." At the time, he suggested that AI could be useful for identifying patterns in code that lead to vulnerabilities, but he remained skeptical about its ability to write high-quality systems code. By late 2024 and early 2025, his rhetoric shifted toward the concept of "maintenance." He began to see AI as a way to assist maintainers in reviewing the thousands of patches submitted to the kernel every month, potentially filtering out low-quality submissions or identifying regressions.
A significant turning point occurred in early 2026, when Torvalds began experimenting with "vibe coding"—a colloquial term for using AI to generate code based on high-level descriptions—for a Python-based hobby project involving an audio visualizer. This personal experimentation likely provided the confidence needed to apply AI to the Linux kernel itself.
By October 2026, during a conversation with Dirk Hohndel at the Open Source Summit Europe in Prague, Torvalds admitted to a complete change of heart. He stated that he had reached a point where he "actually really likes using AI," describing it as a tool that makes programming more enjoyable and efficient. However, he maintained a boundary of caution, emphasizing that AI must be used correctly and under strict human direction, particularly when the work involves critical infrastructure like the Linux kernel.
The Risks of AI Integration: Unresolved Engineering Trade-offs
Despite the impressive performance metrics, the AI-assisted patches are not without controversy or technical hurdles. Torvalds himself acknowledged that the current solution is an experiment rather than a finished product. The primary concern lies in the "least solved" aspect of the series: memory management.
By delaying the reclamation of memory until an RCU grace period elapses, the kernel effectively keeps memory "in limbo." In memory-constrained environments, this could lead to exhaustion or inefficient use of available RAM. Furthermore, the new path introduces a performance regression in specific edge cases. If a read targets a user page that has not yet been mapped, the system incurs an additional failed exception before falling back to the standard implementation.
As of mid-October, these patches remained in a dedicated branch, separate from the mainline Linux 7.3-rc6 release. The decision to merge this code into the stable kernel will depend on whether the community can resolve these memory reclamation issues without sacrificing the performance gains achieved by the AI-assisted design.
Broader Implications for the Open Source Ecosystem
The fact that the world’s most prominent kernel developer is now using Claude Code sends a powerful signal to the global software engineering community. For years, the debate over AI in coding has centered on whether LLMs produce "garbage" code or violate intellectual property. Torvalds’ approach—using the LLM as a "coding assistant" under his direct supervision—suggests a middle path where the AI acts as a sophisticated "force multiplier" for expert developers.
Industry analysts suggest that this could lead to a broader adoption of AI tools across other critical open-source projects, such as the GNU Compiler Collection (GCC) or the LLVM project. If AI can assist in solving deep architectural bottlenecks in the Linux kernel, it can likely be applied to other complex systems-level challenges.
However, this shift also raises questions about the future of the "maintainer" role. If AI can generate patches and tests, the bottleneck in open-source development may shift from "writing code" to "reviewing AI-generated code." Torvalds’ recent experience suggests that the human element remains indispensable; the AI provided the "first draft" and the "test programs," but it was Torvalds who identified the specific shared-memory bottleneck and directed the tool toward the RCU-based solution.
Conclusion
The announcement that Linus Torvalds used Claude Code to address one of Linux’s most stubborn performance issues marks the end of an era of AI skepticism in systems programming. While the patches are currently experimental and face significant hurdles regarding memory reclamation and edge-case regressions, the data-driven results are undeniable. A three-fold increase in throughput for common read operations demonstrates that AI, when wielded by a master of the craft, can unlock optimizations that have eluded human developers for years.
As the Linux kernel continues to evolve, the integration of AI tools will likely become a standard part of the workflow. The challenge for the community moving forward will be to maintain the kernel’s legendary stability and security while embracing the speed and innovative problem-solving capabilities offered by next-generation coding assistants. For now, the "Torvalds experiment" serves as a definitive case study in the successful marriage of human architectural expertise and machine-generated implementation.
