跳到正文
Hacker News 熱門(buzzing.cc 中文翻譯)·· 2 小時前AI 評分65

林納斯·托瓦茲提交首個由大型語言模型輔助的補丁系列供審查

林纳斯·托瓦兹首个由大型语言模型辅助的补丁系列

AI 導讀

林納斯·托瓦茲已提交首個由大型語言模型輔助的 10 個補丁系列供審查,用以處理一項長期存在的問題。補丁改良 folio 查找,並在 folio 熱門時延遲至 RCU 週期結束後才釋放,讓 folio 資料存取也在 RCU 保護下進行;用戶空間複製不會引發 page fault 時,快速路徑便無須增加引用計數。

正文

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.


來源:Hacker News 熱門(buzzing.cc 中文翻譯) · lwn.net