Linus Torvalds used Claude Code to develop a new Linux kernel feature

A command line interface showing the text ubuntu@ubuntu:~$ sudo with a blinking cursor

Linus Torvalds has been on record supporting AI for Linux kernel debugging. Now he’s taken it a step further: he used Claude Code to help develop a new kernel feature, not just find bugs in existing code.

What Torvalds Actually Did

In a recent patch message, Torvalds wrote:

“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.”

The work was for a branch called noref-filemap-read-with-llm. Michael Larabel of Phoronix noted that a new kernel branch appearing in Torvalds’ main repository is itself unusual.

The Technical Idea

The branch explores a page cache optimization. The existing approach tracks every reader with a reference count, which creates heavy CPU locking under load. Torvalds’ idea uses Linux’s Read-Copy-Update (RCU) synchronization mechanism instead, allowing lockless reads through deferred memory freeing and reference-free copy. The framing: a folio removed from the page cache returns to the page allocator only after an RCU grace period.

Status

The patches are publicly viewable in the kernel repository. There’s no confirmed decision yet on whether they’ll be merged into the upcoming 7.4 kernel.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo