Linus Torvalds Uses Claude Code to Develop Linux Kernel Patches
Summary
Linus Torvalds has released an eight-patch Linux kernel series largely written with Anthropic’s Claude Code under his direction. The patches target contention in the page cache when multiple threads perform small reads from the same cached file, a problem known since 2024. In a test using eight threads, 16-byte pread() calls, and a four-core/eight-thread Intel Core i7-8565U laptop, the shared cache line represented 99.92% of measured cross-core HITM load. The proposed design delays reuse of page-cache memory until an RCU grace period, allowing readers to avoid repeatedly updating a shared folio reference counter. In that workload, throughput increased from about 9.9–10.4 million reads per second to 30–33 million, while kernel cycles per read fell from roughly 2,950 to 725; single-thread performance improved from about 452–454 cycles to 408–409. Torvalds cautioned that these results apply to the specific experiment, not Linux overall, although systems with more CPUs or multiple sockets may benefit more. The series still has unresolved memory-reclamation trade-offs and adds a failed exception when a read targets an unmapped user page. As of October 13, the branch was outside mainline Linux 7.3-rc6, so its eventual merge is uncertain. The experiment marks a shift in Torvalds’s use of AI from bug-finding and review toward generating serious kernel code, while retaining human direction and caution.