Claude Code has optimized Linus Torvalds' experimental Linux kernel, addressing a page cache bottleneck that slows concurrent reads. The eight-patch series, detailed in an October 10 commit on the noref-filemap-read-with-llm branch, significantly improved throughput in a benchmark test on a laptop. Torvalds acknowledged Claude Code's contributions, including implementation, test programs, review materials, and initial documentation, all under his supervision.

Instead of taking references, the proposed read path leverages read-copy-update (RCU) to prevent premature memory reuse. Folios that are removed from the page cache are returned to the allocator only after an RCU grace period, allowing protected readers to directly copy cached data into user space.

A testing experiment on an Intel Core i7-8565U laptop, equipped with four cores and eight threads, and running the ext4 file system, saw significant enhancements in performance. Eight threads executing 16-byte pread() operations on a cached page saw reads increase from roughly 9.9–10.4 million per second to 30–33 million. Additional patches accelerate grace periods when per-CPU queues exceed 1,024 pages, reducing retained memory without addressing the accounting issue.

Race testing revealed no corrupted reads, but intentionally bypassing deferred freeing led to incorrect data, highlighting the importance of lifetime guarantees. Explore for your team.