{"id":203224,"date":"2026-10-12T16:20:13","date_gmt":"2026-10-12T16:20:13","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/203224\/"},"modified":"2026-10-12T16:20:13","modified_gmt":"2026-10-12T16:20:13","slug":"linus-torvalds-pushes-claude-code-generated-linux-kernel-patches-tripling-small-read-throughput-biggo-finance","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/203224\/","title":{"rendered":"Linus Torvalds Pushes Claude Code-Generated Linux Kernel Patches Tripling Small-Read Throughput \u2014 BigGo Finance"},"content":{"rendered":"<p>A new branch in Linus Torvalds&#8217; personal Linux repository carries a name that leaves no ambiguity about its origins: noref-filemap-read-with-llm. The suffix is not a joke. Torvalds confirmed that the code, the test programs, the review behind the patch list, and even the first draft of the cover letter were produced by Claude Code, the AI coding assistant from Anthropic, working under his direction. The measurements, he added, were run on his own machine.<\/p>\n<p>What makes the branch notable is not simply that AI wrote kernel code. It targets a genuine scalability problem that has frustrated engineers for years. When many threads perform small reads on the same file, the page cache must atomically increment and decrement a reference count on the folio holding the page for every operation. Those two atomic writes land on the same cache line within the same struct page, causing the line to bounce between CPU cores. On Torvalds&#8217; Core i7-8565U laptop, with eight threads issuing 16-byte pread calls on the same page, that single cache line accounted for 99.92% of cross-core load HITM traffic.<\/p>\n<p>The problem was first raised in 2024 by Matthew Wilcox, who encountered it in customer workloads. Earlier efforts tried to copy data into a stack buffer without holding a reference and then validate afterward. Those attempts stalled on races the validation could not see, such as a page being freed and reinserted at the same index. Torvalds took the opposite approach: rather than detecting the races, he removed them entirely. Under the new design, a folio leaving the page cache must wait for an RCU grace period before returning to the page allocator. Readers inside an RCU read-side critical section can then copy directly from the page into the user buffer, with no reference counting, no bounce buffer, and no limit on read size.<\/p>\n<p>The eight-patch series includes two safety valves. If a single CPU accumulates more than 1,024 pages queued for release, the kernel forces an expedited grace period to prevent memory from piling up indefinitely.<\/p>\n<p>All performance data came from the same four-core, eight-thread laptop, with mitigations disabled. With eight threads reading the same file, the cost per read dropped from roughly 2,950 cycles to about 725. Throughput jumped from 9.9 to 10.4 million reads per second to between 30 and 33 million, a threefold improvement. Single-threaded reads got cheaper too, falling from 452-454 cycles to 408-409, roughly a 10% gain. Perf c2c measurements showed load HITM events collapsing from 30,538 to 101.<\/p>\n<p>The approach carries costs. Reading a user page that has not yet been mapped triggers an extra failed fault before falling back to the old path. A 16-byte single-threaded read in that scenario slowed from about 4,150 cycles to 6,550. Under a 2 GiB virtual machine stress test, a version with only six patches triggered the OOM killer on four of eight CPUs, while the complete series completed on one, two, four, and eight CPUs.<\/p>\n<p>Torvalds has used AI for kernel debugging before, but allowing an agent to introduce a memory management series into his main tree represents a shift in posture. In October 2024, he said 90% of AI talk was marketing hype. By July 15, 2026, he was publicly defending AI tools on the kernel mailing list, telling critics to be quiet or &#8220;do what open source is all about &#8211; fork it or just go away.&#8221; One catalyst was Google&#8217;s March release of Sashiko, an AI code review system that reportedly caught about 53% of bugs in testing. Yet his view remains bifurcated. In May 2026, he complained that AI-generated bug reports had made the kernel security mailing list &#8220;almost unmanageable.&#8221; The line he draws is explicit: he directs the tool, verifies results with real hardware measurements, and signs his name to the output. That, he suggests, is different from an unsolicited AI-generated CVE report nobody wants.<\/p>\n<p>The series has not been merged. It sits on top of Linux 7.3-rc6, tested on a single laptop. Torvalds has been candid about the design choices he remains unsure about. He expects larger machines and multi-socket systems to benefit more, but acknowledges he has not tested them. Whether the work lands depends on the memory management maintainers and on multi-core server users willing to reproduce his numbers.<\/p>\n<p>A Second AI-Assisted Branch<\/p>\n<p>On the same weekend, a second artifact appeared in Torvalds&#8217; tree: an assoc-array-fixes Git tag. The associative array library, used by the kernel&#8217;s associative array implementation, had a bug reported by Nils Ollrogge, who also supplied a patch. The code was too obscure for Torvalds to follow, so he turned to LLM tools to make sense of it.<\/p>\n<p>&#8220;Nils Ollrogge reported a bug in the assoc_array library and had a patch to fix it too, but that code was too obscure for me to follow, so I did what I preach: use modern LLM tools to help make sense of it all,&#8221; Torvalds wrote in the tag message. The LLM-assisted branch splits up larger, hard-to-read functions to improve readability. The code was then run through a user-space test harness, which confirmed the original bug and uncovered three additional ones, all dating back to the library&#8217;s first commit in 2013.<\/p>\n<p>Neither the noref-filemap-read-with-llm branch nor the assoc-array-fixes tag has reached the master branch. Both are expected to be candidates for the Linux 7.4 merge window.<\/p>\n<p>What It Means<\/p>\n<p>The episode marks a turning point in how the kernel&#8217;s most influential maintainer approaches development. Torvalds has moved from occasional AI-assisted debugging to accepting an LLM-generated patch series targeting core memory management infrastructure. The fact that the cover letter states this explicitly, without hedging, signals a deliberate statement about the role he believes AI should play: as a tool directed by an engineer who takes responsibility for the result.<\/p>\n<p>The performance numbers, if they hold on larger hardware, would be significant for workloads that hammer the page cache with concurrent small reads. Database engines, web servers, and file-serving applications frequently fit that profile. But the single-laptop testing and the acknowledged regression on unmapped user pages mean the series is far from a guaranteed merge.<\/p>\n<p>For the broader open-source community, the branches raise a question that has been simmering since AI coding tools went mainstream: where is the line between useful assistance and delegating too much? Torvalds&#8217; answer, at least for now, is that the line sits at verification and accountability. The tool proposes; the human measures, tests, and signs.<\/p>\n<p>Note: The noref-filemap-read-with-llm branch is based on Linux 7.3-rc6 and has been tested only on a Core i7-8565U laptop with mitigations disabled. The assoc-array-fixes tag has not yet been merged to master.<\/p>\n","protected":false},"excerpt":{"rendered":"A new branch in Linus Torvalds&#8217; personal Linux repository carries a name that leaves no ambiguity about its&hellip;\n","protected":false},"author":2,"featured_media":203225,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[53,3154,94885,182,2798,94831,94832,94886,94888,94884,94883,94887],"class_list":["post-203224","post","type-post","status-publish","format-standard","has-post-thumbnail","category-anthropic","tag-anthropic","tag-anthropic-claude","tag-assoc_array","tag-claude","tag-claude-code","tag-linus-torvalds","tag-linux-kernel","tag-matthew-wilcox","tag-nils-ollrogge","tag-noref-filemap-read-with-llm","tag-page-cache","tag-rcu"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/203224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=203224"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/203224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/203225"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=203224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=203224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=203224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}