Linus Torvalds is using AI to develop Linux kernel code now

Linus Torvalds has published an eight-patch Linux kernel series that he says was largely produced with an LLM coding assistant. In the Git submission, he wrote that the code, the test programs, the review and the first draft of the accompanying text were done with Claude Code under his direction. The patches sit on a branch named noref-filemap-read-with-llm in his repository, and as of Oct. 13 the work remained outside mainline Linux 7.3-rc6, with no decision on whether or when it might be merged.
The target is a long-standing source of contention in Linux's page cache, the in-memory store of file data. When several threads repeatedly read small amounts from the same cached file, they take and release references to the folio holding that data. Each reference-count update is an atomic write to a shared cache line, so processor cores end up fighting over one line. This is not a hypothetical concern. Torvalds measured an eight-thread workload issuing 16-byte pread() calls against the same page on a four-core, eight-thread Intel Core i7-8565U laptop and found that the shared cache line accounted for 99.92% of measured cross-core load, based on Hit in Modified cache line (HITM) counts.
The problem has been known since 2024, and earlier attempts to fix it did not land. The new approach changes when the kernel may reuse memory that has been removed from the page cache. Instead of handing that memory back to the allocator right away, the patches defer reuse until a read-copy-update (RCU) grace period has passed. RCU is a synchronization mechanism that lets readers proceed without locks while the kernel waits for all pre-existing readers to finish before reclaiming a structure. With that guarantee in place, a reader inside an RCU read-side section can copy data straight into a user buffer without taking a folio reference at all, which removes the repeated atomic updates on the shared counter.
The measured gains on that test are large. Eight-thread throughput went from approximately 9.9 to 10.4 million reads per second to 30 to 33 million. Kernel cycles per read fell from roughly 2,950 to 725. Single-thread reads improved much less, from about 452 to 454 cycles per read down to 408 to 409. In his pull request, Torvalds noted that a machine with more CPUs, or more than one socket, should gain more, adding that nothing bigger had been measured. That last phrase is worth keeping in view: the numbers describe one small-read workload on a personal laptop, not Linux overall. Nothing here implies the kernel as a whole runs three times faster.
The trade-offs are real and, by Torvalds's own account, unfinished. Deferring memory reuse means pages can stay unavailable while the kernel waits out an RCU grace period, and in the Git submission he called that reclamation issue the part of the series that is least solved. There is also a regression when a read targets a user page that has not yet been mapped: the new path takes an extra failed exception before falling back to the existing implementation. So the branch demonstrates a substantially faster read path alongside unresolved questions about memory pressure, which is exactly the kind of open engineering work that has to be settled before kernel code can move toward production.
Context matters for reading the significance of this submission. Torvalds's position on AI has shifted over time rather than flipping. In December 2023 he described AI as a tool that could help developers do better work, with the emphasis on finding bugs rather than writing code. By late 2025 he was calling himself a huge believer in AI as a tool and expressing interest in maintaining and reviewing patches, while generating serious new code for Linux stayed largely off the table. In January 2026 he experimented with AI-assisted coding on a Python audio visualizer as a hobby project. Speaking with Dirk Hohndel at Open Source Summit Europe in Prague in remarks reported Oct. 9, he said he used to think AI was not very good, but now really likes using it, describing it as a wonderful tool when used correctly and treated as a tool, and saying it makes programming much more enjoyable. He also cautioned that care is needed when using AI for something real and important.
My reading is that this patch series is a deliberate experiment that puts both halves of that position on display at once. The benchmark numbers are striking, but the reclamation delay and the not-yet-mapped-page regression are the kinds of details that kernel reviewers scrutinize hardest, and on a subsystem as hot as the page cache a small worst-case memory-pressure cost can matter more than a large average-case throughput win. A likely path forward is that the approach gets reworked, narrowed to specific read paths, or paired with better reclaim behavior before it sees mainline. The other piece of the story is procedural: a documented disclosure from the maintainer about how the code was produced is itself notable for a project whose review culture depends on knowing who wrote what and on what evidence.
Why it matters: Linux kernel developers and maintainers get a worked example of LLM-assisted kernel work being published openly, with benchmarks, a named tool and a disclosed review trail, which makes it easier to judge how such contributions should be evaluated. Product and platform teams that depend on the page cache may eventually see better multi-threaded small-read throughput on multi-core machines, though inference from the stated facts suggests that timing depends on resolving the memory-reclamation and regression issues first. The broader shift is that AI-assisted code has arrived in a project where the bar for merging is among the highest in software.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
The move is a turning point in the developer’s relationship with AI and Linux.