Linus Torvalds posted his first LLM-assisted patch series to the Linux kernel mailing list. The series comprises ten patches that enhance folio lookup by identifying when folios are "hot" and applying an RCU (Read-Copy-Update) delay to defer release. This mechanism extends RCU protection beyond the folio lookup path to cover the actual folio data accesses themselves. The fastpath eliminates refcount operations because reading data from the folio becomes possible entirely within an RCU-protected region when the user copy does not trigger page faults. The reported outcome is an order-of-magnitude speedup for a read-heavy benchmark. A review of the code has already uncovered a race condition, indicating that additional work will be required before integration.

What folios and RCU have to do with it

The Linux kernel uses folios as a unified page-structures representation. In filesystems and virtual-memory paths, folio lookup and data access happen frequently on read-intensive workloads. Traditional implementations rely on reference counting (refcount) to manage object lifetime, which adds synchronization overhead on every access. Torvalds's patches replace that pattern with an RCU-based approach: the kernel marks a folio for delayed release until after an RCU grace period, then reads both the folio structure and its data under RCU protection. Removing the refcount from the fastpath means the CPU can dereference and read the folio in a single critical section without atomic increment/decrement operations.

How the LLM-assisted patch came together

The series was generated with the assistance of a large language model, marking a notable moment in kernel development practice. Ten patches address a single codepath: notice hot folios, insert an RCU-delay marker, and restructure the readfast path so that folio data is consumed under RCU rather than under a refcount. The model produced the initial set, which human reviewers then audited, refined, and adjusted for the kernel's strict correctness requirements. One reviewer identified a race condition in the folio-release sequence, confirming that machine-generated patches still require the same rigorous scrutiny as hand-written code.

Measured impact

On a read()-heavy microbenchmark, the patch series demonstrated roughly a tenfold improvement in throughput. The speedup stems from eliminating per-access reference-count updates and from allowing the CPU to stream folio data through an RCU-protected region without blocking on reference-count acquisition. The benchmark compared a baseline kernel with the patched variant under identical workload conditions, and the delta was large enough to be immediately noticeable in profiling output.

Remaining work

The identified race condition centers on the precise moment the RCU-delayed folio release interacts with concurrent write paths. Until that codepath is constrained, the series cannot be merged. The maintainer and contributors will need to iterate on the RCU grace-period calculation and verify that no window exists where a folio can be freed while a reader still holds a reference through the fastpath. A second review cycle will follow once a fix is submitted.

Why this matters for kernel development

The series illustrates that LLM tools can produce functional, reviewable kernel patches at scale. It also sets an expectation: future patches generated with model assistance will be held to the same standard of correctness as any other contribution. The RCU-based folio path, if resolved, could become a permanent optimization for filesystems and block devices that serve read-heavy workloads. Kernel developers watching the thread have already begun discussing how similar patterns might apply to other cache-friendly data structures.