商业产业 Hacker News Claude 2026-10-12T01:57 正文 ok 352 words

Linus Torvalds 借助 Claude Code 推进重大 Linux 内核改进

英文标题:🔶 Linus Torvalds Working on a Hefty Linux Kernel Improvement with Claude Code

Linux 创始人 Linus Torvalds 正在使用 Claude Code 开发一项 Linux 内核内存管理改进,以缓解多线程对同一文件进行小规模读取时的 folio 引用计数争用问题。相关代码位于 `noref-filemap-read-with-llm` 分支,目标是在读取 page cache 时不再依赖 folio 引用。Torvalds 确认,代码、测试程序、审查以及说明信初稿均在其指导下由 Claude Code 完成,性能测量则在其本机运行。测试结果显示该补丁系列带来显著性能差异,后续是否会进入 Linux 7.4 合并窗口仍有待观察。
打开原文相关 3 · 机会 0
media20.3 KB media13.8 KB

中文

Linux 创始人 Linus Torvalds 此前曾被报道

使用 AI 协助进行内核调试

,并且在内核代码树之外也曾使用

Google Antigravity 进行一些氛围编程(vibe coding)

。他此前曾表示,

他将 AI 视为一种实用工具

。如今看来,他甚至正在使用 Claude Code 开发新的 Linux 内核功能。

在等待 Linux 7.3-rc7 内核发布并刷新其

torvalds/linux.git

仓库时,我惊讶地发现出现了一个新的内核分支。通常,Torvalds 不会在其主仓库中进行太多分支开发,一般只维护

master

分支。

noref-filemap-read-with-llm Git 分支

新出现的分支名为

noref-filemap-read-with-llm

,正如其后缀“LLM”所暗示的那样,这是他在 AI/大语言模型协助下开发的一项新内核改进,具体使用的是 Claude Code。该分支中的代码正致力于调整内存管理代码,以便在不使用 folio 引用的情况下从 page cache 中读取数据。

这项代码旨在解决 Linux 中的一个问题:多个线程对同一个文件进行小规模读取时,会在 folio 引用计数上发生争用。因此,这一分支/补丁系列的目标是在不使用 folio 引用的情况下读取 page cache。

对于无论喜爱还是反感 AI 的读者而言,在主要的

补丁说明

中,Linus Torvalds 确认他在创建这项工作、进行相关测试,甚至撰写说明信初稿时使用了 AI:

“代码、测试程序、上面列表背后的审查,以及本文本的第一版草稿,都是在我的指导下由一款 LLM 编程助手(Claude Code)完成的。测量是在我的机器上运行的。”

而对于解决“多线程对同一文件进行小规模读取”这一瓶颈的影响而言,这一补丁系列的效果十分显著:

Linus Torvalds 的 AI 代码性能结果

差异相当明显。这些补丁目前位于 Torvalds 的

noref-filemap-read-with-llm Git 分支

中。后续还要观察他是否会在即将到来的 Linux 7.4 合并窗口中合并该分支。

更新:

Torvalds 还曾有更多 AI 辅助内核开发的案例,详见:

Linus Torvalds“践行了自己的主张”,使用 AI 让代码更易理解,并发现更多 Bug

。

English / 原文

Linux creator Linus Torvalds has been known to

use AI to help with kernel debugging

and outside of the kernel tree has also done

some vibe coding with Google's Antigravity

. He has previously said

he views AI as a useful tool

. It turns out he's even now using Claude Code for working on new Linux kernel features.

While waiting for the Linux 7.3-rc7 kernel release and refreshing his

torvalds/linux.git

repository, I was surprised to find a new kernel branch appear. Typically Torvalds isn't doing much work on branches in his main repository and typically just hosting the

master

branch.

noref-filemap-read-with-llm Git branch

The new branch to appear is

noref-filemap-read-with-llm

and as implied by the "LLM" postfix, is some new kernel improvements he's been working on with the help of AI / LLMs. Claude Code in particular. The branched code is working on adapting the memory management code to read from the page cache without folio references.

The code is working on addressing a Linux issue of small reads of one file from many threads contend on the folio reference counting. So the goal of the branch / patch series is to read from the page cache without folio references.

For those passionate about AI for loving or hating it, in the main

patch message

Linus Torvalds confirmed his AI use in creating this work and related testing and even the initial draft of the cover letter:

"The code, the test programs, the review behind the list above and the first draft of this text were done with an LLM coding assistant (Claude Code) under my direction. The measurements were run on my machine."

And for the impact on this situation of addressing the bottleneck of small reads of one file from many threads, the impact of the series is significant:

performance results of Linus Torvalds AI code

Quite a difference. The patches are currently on Torvalds'

noref-filemap-read-with-llm Git branch

. We'll see if he merges his branch for the upcoming Linux 7.4 merge window.

Update:

Some additional AI kernel usage by Torvalds with

Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs

.