Linus Torvalds Uses Claude Code to Speed Up the Linux Kernel
Krasa AI
2026-10-13
4 minute read
Linus Torvalds Uses Claude Code to Speed Up the Linux Kernel
Linus Torvalds, the creator of Linux, has published an experimental kernel branch that he built with help from Anthropic's Claude Code. The changes target a performance bottleneck in how Linux reads files, and early numbers from his own laptop show small-read throughput nearly tripling.
It's one of the most visible endorsements yet of AI coding tools. When the person who has guarded the world's most important open-source codebase for 35 years uses an AI assistant, developers pay attention.
How this came to light
Phoronix's Michael Larabel spotted the branch on October 11 while waiting for the Linux 7.3-rc7 release. It's called noref-filemap-read-with-llm, and it sits in Torvalds' own repository, which normally hosts only the main branch.
In the patch message, Torvalds said Claude Code was used "under my direction." According to Phoronix, the tool helped write the code, build test programs, review the changes, and draft the first version of the cover letter (the summary email that introduces a patch series).
He also added a caveat: "The measurements were run on my machine."
What the patch actually does
The change reworks the page cache, the part of Linux that keeps recently read file data in memory so the system doesn't hit the disk every time.
Today, each read bumps a reference count (a tally that tracks who is using a piece of memory). When many threads read small chunks of the same file at once, they all fight over that tally. The new code lets reads skip the reference counting, removing the traffic jam.
Think of a busy database or web server where dozens of threads keep reading the same config or index file. That's exactly the workload this targets.
The numbers
According to benchmark figures reported from the patch series, using 16-byte reads on Torvalds' four-core laptop:
- Multi-threaded throughput rose from about 10 million reads per second to 30 to 33 million.
- Kernel cycles per read dropped from about 2,950 to about 725.
- Single-threaded reads improved modestly, from about 453 cycles to about 408.
The eight-patch series is built on Linux 7.3-rc6. It hasn't been merged and still needs independent review.
Not a one-off
Torvalds used AI again the same weekend. He published an "assoc-array-fixes" tag after Nils Ollrogge reported a bug in the kernel's associative array library and submitted a fix that Torvalds found hard to follow.
Torvalds wrote that he "did what I preach" and used "modern LLM tools to help make sense of it all." The result was an "LLM-assisted branch which makes the code more readable." A test harness confirmed Ollrogge's bug and uncovered three more, "all going back to the very first commit adding this library back in 2013."
Why this matters: AI didn't just write faster code. It also helped surface decade-old bugs that human reviewers had missed.
Who this affects
Kernel developers now have a clear signal from the top that AI-assisted patches are acceptable, as long as a human directs the work and owns the result.
Open-source maintainers everywhere are watching. Many projects have debated banning AI-generated contributions. Torvalds' approach offers a middle path: use the tool, but stay in charge.
Anthropic gets a high-profile proof point for Claude Code in one of the most demanding codebases on Earth.
What insiders are saying
The news spread fast on X. Developer Ayaan summed up the reaction: "Linus Torvalds is using Claude Code to make the Linux kernel faster."
Torvalds had already set the tone in July, writing on the kernel mailing list that "Linux is not one of those anti-AI projects" and that "AI is a tool, just like other tools we use. And it's clearly a useful one."
What's next
The patches are aimed at the Linux 7.4 merge window, which opens after Linux 7.3 ships. Whether Torvalds merges them depends on review from memory-management maintainers.
Watch for independent benchmarks on servers and other hardware. Laptop numbers are a promising start, but real-world gains will vary by workload.
The bottom line
The most famous programmer alive is using an AI coding assistant on the Linux kernel, openly and with credit in the commit. If you've been on the fence about AI coding tools, that's a strong signal. Use them the way Torvalds does: you set the direction, you check the results, and you own what ships.
Sources
Don't fall behind
Expert AI Implementation →Related Articles
Amazon in Talks to Buy AI Startup Decart for About $7 Billion
Amazon is reportedly negotiating a roughly $7 billion deal for Decart, maker of AI chip-optimization software and real-time world models.
min read
Anthropic Says New Claude Defenses Cut Distillation Up to 99%
Anthropic's new defenses against distillation attacks cut harvested Claude data by 90-99% and banned tens of thousands of accounts. Here's how they work.
min read
Anthropic Warns Small AI Models Could Soon Self-Replicate on IoT
Anthropic's Frontier Red Team says small open-weight AI models may be months from copying themselves across cheap smart devices without a datacenter.
min read