Harnesses

Linus Torvalds submits first LLM-assisted Linux kernel patch series

October 17, 2026 · 2 min read

Also published in Norsk

a computer screen with a bunch of text on it
Taiki Ishikawa / Unsplash

Linus Torvalds has pushed a new development branch named noref-filemap-read-with-llm to his personal Git repository, marking the formal submission of his first kernel patch series developed with the assistance of a large language model. The branch was created to address long-standing bottlenecks in Linux memory management, specifically focusing on improving the scalability of page reference counting. The patch series is currently in an experimental stage and has not yet been merged into the official Linux 7.4 mainline.

The technical challenge addressed by the patches involves scenarios where multiple threads perform high-frequency, small-scale reads of the same file. Under these conditions, traditional mechanisms repeatedly trigger reference count updates in the page cache, which can lead to severe race conditions and contention on multi-core CPUs. Torvalds stated that the core code, test programs, vulnerability reviews, and initial drafts of the announcement documentation were all completed collaboratively with the AI coding tool Claude Code, under his direct supervision. He noted that he disabled some security protections on his computer to conduct the necessary testing for this work.

Performance benchmarks conducted by Torvalds demonstrate significant improvements in file reading throughput. In a specific test load where eight threads simultaneously read the same file, the read throughput increased from a range of 9.9 million to 10.4 million operations per second to a range of 30 million to 33 million operations per second. This represents an approximate threefold increase in performance. Additionally, the number of kernel clock cycles consumed per single read operation decreased sharply from approximately 2,950 cycles to 725 cycles, indicating a more efficient use of processing resources during these operations.

Beyond this specific patch series, Torvalds has utilized large language models for other maintenance tasks. During a recent Maintainers Summit and in a separate cleanup of the assoc_array codebase, he used LLMs to refactor obscure and outdated code. In one instance, this process identified three hidden bugs in the Linux system that had been present since 2013, dating back to the first commit of that code. The involvement of AI tools in these tasks highlights a shift in development practices for core system components, where automated assistance is being applied to both new feature development and legacy code maintenance.