Skip to main content

Kaer NewsSoftware

Torvalds uses Claude Code to write eight Linux kernel patches

Linus Torvalds used Anthropic's Claude Code to produce eight experimental patches fixing a Linux page cache performance issue that reached 23x read throughput, before reviewers found a race condition.

4 min read
Torvalds uses Claude Code to write eight Linux kernel patchesPhoto: Computerworld

Key points

Linus Torvalds used Claude Code to write eight experimental Linux kernel patches fixing a page cache performance issue, which reviewers found a race in before anything merged.

Linus Torvalds, creator of the Linux kernel, has begun using Anthropic's Claude Code to write code for the kernel, producing eight code changes to resolve a performance issue. The changes are experimental and have not been incorporated into the official Linux kernel. Torvalds disclosed the tool's role in the project's documentation.

The work matters because Torvalds is the final authority on what enters Linux, the operating system running most of the world's servers. His move from scepticism to active use of AI-assisted coding marks a shift for the kernel community, which has debated how to handle AI-generated contributions and whether to require contributors to disclose them.

Eight patches, none merged yet

Torvalds wrote in the project documentation that the code, the test programs, the review forming the basis of his list, and the first draft of the text were produced with the help of an LLM coding assistant, Claude Code, under his supervision. The eight changes target a performance issue in Linux. None has been merged into the official kernel; all remain experimental.

The changes address the Linux page cache, the memory area the kernel uses to hold recently read file data so repeated reads avoid slower disk access. The fix reached 23x read throughput in testing. That figure describes how much faster reads ran with the patch applied, compared with performance before it, though the patch has not been accepted.

Kernel reviewers examined the work and found a race condition — a flaw where two operations interfere because their timing is uncontrolled — before anything was merged. The discovery shows the changes are still under scrutiny. Reviewers identified the problem during evaluation, and no patch from the set has entered the official Linux kernel source tree.

Reviewers find a race

Torvalds previously expressed scepticism about AI-generated code. At the Open Source Summit Europe conference in Prague, he said he had reached a point where he really enjoys using AI, having used to think the technology just wasn't very good. His change in view accompanies the community's broader shift: AI coding agents now produce code of acceptable quality for kernel purposes.

Greg Kroah-Hartman, a veteran Linux kernel maintainer, said at the Linux Foundation's Open Source Summit in South Korea in August that LLMs are good enough now, arguing they have gotten good enough to find bugs because they are pattern matchers and code is nothing but patterns in a specific format. His comment reflects cautious acceptance within the maintainer community.

The kernel community has also changed its disclosure rules. Sasha Levin, a Linux kernel developer and engineer at Nvidia, wrote to the Linux kernel mailing list that the Maintainers Summit reached consensus to deprecate the Assisted-by tag and remove the documentation requiring it. The tag had required contributors using advanced coding tools to acknowledge that in their commit message.

The AI labelling proposal first took shape in July 2025 and entered the documentation in January 2026. Jeff Layton, a Linux kernel developer with Red Hat, gave three reasons for reversing course: not everyone abided by the policy, it served as free advertising for proprietary LLM companies, and it was unclear why the information should be collected.

Not everyone agreed. Laurent Pinchart, a Linux kernel developer and founder of Ideas on Board, wrote that he was not happy removing the tag without adding another mechanism for required disclosure, and argued there is still value in setting expectations. Torvalds rejected such rules, writing that proposals barring AI use for certain tasks are UTTERLY STUPID and comparing them to banning compilers.

Concerns persist about errors slipping through unnoticed, accountability, and coding agents reproducing copyrighted code. Claude adds provenance messages by default, while Codex does not. Torvalds's own rule for contributors is that they must understand the code they submit, whatever tools they use — a standard the eight experimental patches still face as reviewers work through them.

The eight Claude Code patches remain unmerged and experimental, with the race condition reviewers found still to be resolved. No date for a decision on merging them has been announced. The Assisted-by tag removal proceeds under the Maintainers Summit consensus, with documentation updates expected as the kernel community formalises the change.

Frequently asked questions

What did Linus Torvalds use AI for in the Linux kernel?

Torvalds used Anthropic's Claude Code to develop eight code changes addressing a performance issue in the Linux page cache, which reached 23x read throughput. He disclosed the tool's role in the project documentation, noting the work was produced under his supervision. The changes are experimental and unmerged.

Were the AI-generated Linux kernel patches merged?

No. The eight changes remain experimental and have not been incorporated into the official Linux kernel. Kernel reviewers found a race condition in the work before anything was merged, and no date for a merging decision has been announced.

Does the Linux kernel require developers to disclose AI tool use?

No longer. The Maintainers Summit reached consensus to deprecate the Assisted-by tag and remove documentation requiring it, according to Sasha Levin. Torvalds opposed such disclosure rules, arguing contributors must simply understand the code they submit regardless of tools used.

More from this edition