Linus Torvalds explicitly stated in a commit message that he produced much of the code, test programs, and first draft of the text with an AI coding assistant in a patch series rewriting the Linux kernel’s page cache read path. The series was published in Torvalds’s personal branch and is currently awaiting maintainer review.
The wording in the commit message’s “Tools” section is clear: “The code, test programs, the review listed above, and the first draft of this text were done with an LLM coding assistant (Claude Code) under my direction.” For one of the most reserved figures about AI use in kernel development, this amounts to a change of stance on the record.
Reference-count load removed from the read path
The patch series touches the filemap_read path in the kernel’s memory management subsystem. The goal is to eliminate the need to take a “folio reference count” for each page when reading a file by using RCU-based deferred freeing; in other words, to spare the reader from this counter traffic, which is expensive for the memory subsystem.
According to measurements Torvalds made on his own laptop (4 cores, 8 threads), for small 16-byte reads the number of reads per second rises from about 10 million to 30-33 million. Processor cycles per read drop from 2,900 to 725. In workloads dominated by small reads, this means a noticeable speedup.
Torvalds also wrote his own doubts in the same message
The most striking thing about the news is not enthusiasm but caution. In the commit message, Torvalds lists 10 unresolved issues one by one and calls the deferred-freeing mechanism, where memory accumulates while waiting to be reused, “the least resolved part of the series.” Regressions in splice behavior, untested paths on some architectures, and validation tools that have not yet been run (xfstests, lockdep, KASAN, 32-bit) are on the list.
He also includes maintainer Matthew Wilcox’s objection: “It looks very risky for this much memory to sit around waiting to be reused.” So even if the code was written by an AI, the human is still the one setting the limits, weighing the risk, and doing the writing.
The patch has not yet entered the mainline
The series has not been merged into Linux’s mainline (master); it remains in Torvalds’s personal branch. A statement in a commit message is the opening of a technical discussion; nothing counts as having entered the kernel until the discussion is closed. That is why headlines like “Torvalds had Claude write the kernel” can make a result that has not yet happened look as if it already has.
Why it matters
Torvalds is known as one of the most cautious figures against low-quality AI output leaking into the kernel. Maintainers such as Greg Kroah-Hartman have also argued that LLM output should go through closer human review. Torvalds’s series moves the discussion somewhere else: the tool is not banned, it is used; but the human directs, the human measures, the human writes down their doubts, and the human takes responsibility with their signature. In an area like the page cache, where a bug can affect the entire system, what sets an example is not the tool itself but the transparency of its use.
Source: WebTuring

Share your experience
Got a question, a different solution or a note to add?
Log in or join us to write a comment.
Log in ↗︎Sign up ↗︎