Hacker News AI · 2026/10/15 00:55:07

Linus Torvalds 首次发布 LLM 辅助 Linux 内核补丁:RCU 优化实现读性能十倍提升

原标题:Linus Torvalds's first LLM-assisted patch series
68AI 研判分
核心综述

Linus Torvalds 在维护者峰会上宣布并提交了首个由大语言模型(LLM)协助编写的 Linux 内核补丁系列。该补丁通过引入“热 Folio”检测机制,将 Folio 数据访问完全置于 RCU 保护区域内,从而消除了快速路径中的引用计数开销。实测显示,这一改动使以读取为主的基准测试性能提升了约一个数量级,但代码审查中已发现竞态条件,表明仍需进一步修正。

报道全文原始报道全文

At the recently concluded Maintainers Summit, Linus Torvalds said that he had been using a large language model to work on a patch series addressing a longstanding problem; he has now posted that series for review.

The fairly short series of ten patches basically enhances folio lookup by noticing when folios are hot, and setting a "delay releasing this folio until after a RCU period", and then using that RCU delay it does not just the folio lookup itself under RCU (which we've done forever), but also the actual folio data accesses themselves under RCU. No refcount taking needed for the fastpath where we can just read the data from the folio entirely in an RCU-protected region when the user copy doesn't cause page faults.

The end result is an order-of-magnitude speedup for a read()-heavy benchmark. Review has already identified a race condition in the code, though, so further work will be needed.