A Linux kernel optimisation that began as an AI-assisted experiment has delivered its headline performance gains only after a human engineer rebuilt it — a two-stage sequence that says more about where AI-generated code actually earns its keep in systems programming than the novelty of Linus Torvalds using AI ever did.

That is the picture Phoronix paints in a follow-up to its earlier coverage of Torvalds' work. The publication attributes the rework to Meta engineer Kiryl Shutsemau, who took the patch series Torvalds drafted with the assistance of Claude Code, rebuilt the implementation, and reported very promising results — markedly better, according to Phoronix, than the original version. The work targets a specific and common bottleneck: reading from the page cache without taking folio references, which should benefit workloads performing small reads from a single file across many CPU threads.

The episode unfolds in two acts. The first was Phoronix's original coverage of Torvalds' disclosure that he had leaned on Claude Code to develop a sizeable kernel improvement — a notably high-profile signal that AI tooling has reached the inner circle of kernel development. The second, the follow-up on the reworked code, is the more instructive one. The core concept — decoupling page-cache reads from folio reference counting — appears to have originated with the AI-assisted draft and survived intact; the implementation, however, was materially rewritten by Shutsemau, and the performance gap, on Phoronix's account, is attributed to that human rework rather than to the originally generated code.

For maintainers and reviewers, the implication is sharper than it first appears. The submission did not arrive as a finished deliverable to be merged, nor is this a case of pasting generated code straight into the kernel; it arrived as raw material that an expert had to interrogate, restructure and validate. Refcounting, locking and memory reclaim sit among the most hazard-prone areas of the kernel, where a plausible-looking patch can introduce subtle corruption under contention. Reworking machine-generated code in that territory arguably sets a higher bar than assessing a conventional human submission, because the reviewer must first establish what the generator intended before judging whether the result is correct. What transfers, then, is not prompting but the discipline the kernel community has always applied — testing, critiquing and rebuilding a first draft, now pointed at output a tool produced in seconds.

One caveat is essential: as of the time of Phoronix's report, neither version of the patch has been merged upstream, and the benchmarks remain preliminary. The publication's characterisation of the results should be read accordingly, and the performance claims will need to hold up under further testing and kernel review before they can be treated as settled.

For the wider open-source and IT community, the story cuts against both the hype and the scepticism surrounding AI-written code. The tool did not deliver the patch; it delivered a starting point, and an engineer's hours of work delivered the performance. If the reworked code survives review, the credit — and the lesson — belong to the human in the loop.

The full analysis is available from Phoronix.


一項原本以 AI 協助實驗形式展開的 Linux kernel 優化,最終要待一名人類工程師重建其程式碼後,才取得矚目的效能收益——這「兩階段」的過程,比起 Linus Torvalds 使用 AI 一事本身的新奇感,更能說明 AI 生成程式碼在系統編程(systems programming)領域中,實際上在哪裏才真正有用武之地。

這正是 Phoronix 在跟進早前對 Torvalds 工作的報道時所描繪的情況。該刊將這次重寫歸於 Meta 工程師 Kiryl Shutsemau:他接手了 Torvalds 在 Claude Code 協助下起草的 patch 系列,重建其實現,並報告了非常理想的結果——按 Phoronix 的說法,明顯優於原版本。該工作針對一個特定且常見的 bottleneck:在不取得 folio reference 的情況下讀取 page cache,此舉理應惠及在多個 CPU thread 上對單一檔案進行小量讀取的工作負載。

整件事分為兩幕。第一幕是 Phoronix 對 Torvalds 披露此事的原始報道——他借助 Claude Code 開發了一項頗具規模的 kernel 改進,這是一個頗不尋常的高調訊號,顯示 AI 工具已觸及 kernel 開發的核心圈層。第二幕,即對改寫後程式碼的跟進報道,才是更具啟發性的一篇。核心概念——將 page cache 讀取與 folio reference counting 解耦——看來源自 AI 協助的草稿並完整保留;然而實現部分已由 Shutsemau 大幅重寫,而按 Phoronix 的記述,效能差距應歸因於這次人工重寫,而非最初生成的程式碼。

對維護者(maintainer)及 reviewer 而言,此事的啟示比乍看之下更為尖銳。這份提交並非作為可直接合併(merge)的成品交付,也不是把生成的程式碼直接貼入 kernel 的案例;它到手時只是原材料,必須由專家加以審視、重組及驗證。Reference counting、locking 及 memory reclaim 屬 kernel 中風險最高的領域之一,一個貌似合理的 patch 可能在爭用(contention)下引入難以察覺的損壞(corruption)。在這片領域重寫機器生成的程式碼,門檻無疑比評估一份傳統的人工提交更高,因為 reviewer 必須先弄清楚生成者的意圖,才能判斷結果是否正確。因此,能夠轉移的不是 prompt 技巧,而是 kernel 社羣一貫奉行的紀律——測試、批評並重建初稿,只是如今對象變成了一個工具在數秒內產出的輸出。

有一點必須強調:截至 Phoronix 發表報道之時,兩個版本的 patch 均未合入 upstream,基準測試(benchmark)結果仍是初步的。該刊對結果的描述應據此理解,效能聲明須經更多測試及 kernel review 考驗後,才能視為定論。

對更廣泛的 open source 及 IT 社羣而言,這則故事同時反駁了圍繞 AI 編寫程式碼的炒作與懷疑。工具交付的不是 patch,只是一個起點;交付效能的,是一名工程師數小時的工作。如果改寫後的程式碼通過 review,功勞——以及教訓——都屬於流程中的人類(human in the loop)。

完整分析可於 Phoronix 閱讀。

新聞來源 / Original News Source