Latest News
Photo: Alex Dawson · CC BY-SA 2.0
Photo credits
Linus Torvalds, 2002, Australian Linux conference · originally posted to Flickr as Linus Torvalds · Resized; thumbnails may be cropped. Adaptations under the same license.

Linus Torvalds Uses AI to Draft Performance‑Improving Linux Patches

Linus Torvalds has released a ten‑patch series, created with a large language model, that promises to dramatically speed up read operations in the Linux kernel.

14 Oct 2026 0 reads Compiled with AI

#Linus Torvalds #LLM

Linus Torvalds announced that he had used a large language model to help craft a patch series that addresses a long‑standing performance problem in the Linux kernel. He has now posted the series for public review. The announcement came after the recently concluded Maintainers Summit.

The series consists of ten patches that improve folio lookup by detecting when folios become hot and delaying their release until after an RCU period. This technique marks hot folios and schedules a release that is safe for read‑copy‑update (RCU) synchronization. The delay allows the kernel to avoid costly page faults.

Because the delay is under an RCU period, the series performs not only the folio lookup under RCU—something the kernel has always done—but also accesses the actual folio data under RCU. This dual use of RCU reduces the need for locking during read operations. It keeps the data path entirely within an RCU‑protected region.

Illustrative photo: Photograph by Brian Hankins · Public domain
Photo credits
Linus torvalds bh · Own work · Resized; thumbnails may be cropped.

The fastpath of the new code eliminates the need to take a refcount when a user copy does not cause page faults. This means the kernel can read the folio data entirely in the RCU region without additional reference management. It simplifies the read path and reduces overhead.

Benchmarks show an order‑of‑magnitude speedup for read‑heavy workloads. The improvement comes from the reduced locking and page fault overhead introduced by the new RCU‑based approach. Users who perform many read operations should see a noticeable performance gain.

Reviewers have spotted a race condition in the patch code, so further work is needed before it can be merged. The race arises in the interaction between the RCU delay and the folio release logic. Fixing the issue will require additional patches or modifications.

Because the LWN site is under high scraper load, comment display is suppressed for anonymous users. Logged‑in users can view the discussion by clicking the button below. The comments provide further insight into the review process.

Hacker News

Report something about this article