Linus Torvalds Uses AI to Write Linux Kernel Code, Drops Mandatory Disclosure Requirements

11 Sources

Share

Linux creator Linus Torvalds released his first AI-assisted patch to the Linux kernel using Anthropic's Claude Code, addressing a decade-old cache contention issue. The Linux kernel community simultaneously deprecated mandatory AI tool usage disclosure, with Torvalds calling AI bans "utterly stupid" while emphasizing developers must understand their code.

Linus Torvalds Submits First AI-Assisted Patch to the Linux Kernel

Linus Torvalds announced he used AI to write code for the Linux kernel, marking a significant shift in his approach to AI-assisted coding. In his Git submission, Torvalds stated, "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."

1

The AI-assisted patch to the Linux kernel addresses a long-standing memory cache slowdown problem when using multiple cores and processors, an issue that has plagued developers since 2024.

1

Source: Tom's Hardware

Source: Tom's Hardware

Performance Gains from AI-Generated Code

The patches tackle cache contention in Linux's page cache, where multiple threads reading small amounts of data from the same cached file create bottlenecks. Using Anthropic's Claude Code, Torvalds developed a solution that defers memory reuse until a read-copy-update (RCU) grace period has elapsed. In synthetic testing on a four-core, eight-thread Intel Core i7-8565U laptop, eight-thread throughput jumped from approximately 9.9-10.4 million reads per second to 30-33 million reads per second.

2

Kernel cycles per read dropped from roughly 2,950 to 725, representing a 23x performance improvement in dedicated benchmarks.

2

Single-thread reads improved more modestly, from about 452-454 cycles to 408-409 cycles per read.

1

Source: Phoronix

Source: Phoronix

AI for Code Generation Uncovers Additional Bugs

Beyond generating initial patches for performance improvements, Torvalds used LLM tools to make sense of obscure code in the assoc_array library. When reviewing a bug report from Nils Ollrogge, Torvalds employed AI to split up larger, hard-to-read functions and make the code more decipherable. This AI-assisted review not only confirmed the original bug but discovered three other bugs that had existed in the code since the very first commit adding this library back in 2013.

3

Torvalds explained in the assoc-array-fixes Git tag that he "did what I preach: use modern LLM tools to help make sense of it all."

3

Source: Phoronix

Source: Phoronix

Linux Kernel Development Drops Mandatory AI Disclosure

The Linux kernel community reached consensus at the Maintainers Summit in Prague on October 8, 2026, to deprecate the Assisted-by tag requirement. Sasha Levin, a Linux kernel developer and engineer at Nvidia, announced in a message to the Linux kernel mailing list: "The Maintainers Summit reached consensus to deprecate the Assisted-by Tag. Remove the documentation requiring it."

4

The policy had previously required developers using "any sort of advanced coding tool in the creation of [their] patch" to acknowledge this through an Assisted-by tag in the commit message.

4

Torvalds Calls AI Bans "Utterly Stupid"

Linus Torvalds responded emphatically to concerns about removing AI tool usage disclosure requirements. He compared arguments against AI-assisted coding to hypothetical bans on compilers or text editors, stating: "Here's a new rule just for you: don't use compilers for any of your kernel submissions. Because if you can't show that you really understand what the machine is actually doing by writing your code in assembler, then I don't want to see your code contribution."

5

Torvalds concluded by asking, "Do you not see how UTTERLY STUPID those kinds of rules would be?" and emphasized that he simply expects people working on the Linux kernel to "understand what they are doing."

5

Evolution from AI Skepticism to Hands-On Use

Torvalds's journey with AI-assisted coding reflects a gradual evolution. In December 2023, he described AI as a potential aid to developers, saying, "I see AI as a tool that can help us be better at what we do," though his interest focused primarily on debugging rather than code generation.

1

By late 2025, Torvalds called himself "a huge believer in AI as a tool," expressing interest in using it for maintaining code and reviewing patches.

1

In January 2026, he began experimenting with AI for code generation in a hobby project involving a Python audio visualizer before applying it to serious Linux kernel development.

1

Implications for Software Development Practices

The shift in AI for code generation policy signals broader acceptance within the Linux kernel community, though debates persist. Jeff Layton, a Linux kernel developer with Red Hat, explained that the tag requirement was reversed because not everyone followed it, it served as "free advertising for proprietary LLM companies," and "it's not clear why we want to collect this info in the first place."

4

Greg Kroah-Hartman, a veteran Linux kernel maintainer, noted at the Linux Foundation's Open Source Summit in South Korea that "LLMs are good enough now" and "They've gotten good enough to find bugs because LLMs, AI, are just pattern matchers and code is nothing but patterns in a specific format."

4

The noref-filemap-read-with-llm branch remains outside the mainline Linux 7.3-rc6, with merge timing for the upcoming Linux 7.4 merge window still uncertain.

1

Today's Top Stories

© 2026 TheOutpost.AI All rights reserved