❯ Linus Torvalds uses Claude Code to rework kernel code, roughly tripling small-read throughput
From 10 million to 30 million reads a secondAccording to PBX Science, Linux creator Linus Torvalds pushed an experimental branch called noref-filemap-read-with-llm. Claude Code produced the code, test programs, a review and the first draft of the cover letter under his direction. On his laptop, eight threads repeatedly reading the same cached file went from about 10 million reads a second to more than 30 million.
One fewer counter updatePreviously, every read of cached file data had to update a shared “reference count,” so threads reading the same file at once fought over it. The new patches use the kernel’s RCU mechanism so reads no longer need to modify that count, reducing contention. The trade-off is that reading a 16-byte range from a page not yet mapped becomes slower. The branch has not been merged and is a candidate for the Linux 7.4 merge window.
Decade-old bugs found along the wayIn separate work, Torvalds used LLMs to make sense of the kernel’s obscure associative array library, assoc_array, and built a test harness that confirmed a bug reported by developer Nils Ollrogge and uncovered three more, all dating back to the library’s first commit in 2013. In his tag message he wrote that he “did what I preach,” using modern LLM tools to understand the code.
▮ SIGNALWhen even the most demanding kernel maintainer has AI write code, the developer’s value becomes clearer: deciding what to change and judging whether it is right are harder to replace than typing it.