Urgent.News

What's breaking now, across thousands of outlets.

AI

Linus Torvalds is using AI to develop Linux kernel code now

The move is a turning point in the developer’s relationship with AI and Linux.

Linus Torvalds is using AI to develop Linux kernel code now

Linus Torvalds, the creator of the Linux kernel, has announced that he now employs artificial intelligence (AI) to assist in writing code for the kernel. After initially being skeptical, Torvalds has come to view AI as a valuable tool for developers and maintainers. In a recent Git submission, he stated that the code, test programs, and initial draft were generated using an AI coding assistant (Claude Code) under his guidance. Torvalds highlighted that he uses AI to address tasks he finds challenging.

The primary use of AI in this context involves resolving a contention issue in Linux's page cache, which stores file data in memory. When multiple threads frequently read small amounts of data from the same cached file, they engage in competing reference-count updates, causing performance degradation. Torvalds discovered that under specific conditions, this issue could slow down work by nearly 100%.

Earlier attempts to fix the problem had been unsuccessful, but Torvalds and Claude Code's proposed patches modify the kernel's memory reuse process. Rather than immediately returning memory to the allocator, the patches delay reuse until a read-copy-update (RCU) grace period has passed. This delay allows for a protected read operation that avoids repeatedly updating a shared reference counter.

As a result, throughput increases significantly—up to 30-33 million reads per second—while kernel cycles per read decrease from about 2,950 to 725. Single-thread reads also improve, though to a lesser extent.

Despite the substantial performance gains reported in the specific test, Torvalds emphasizes that the overall performance of Linux will not be three times faster. The performance improvements are observed in a particular small-read workload on Torvalds' personal laptop. However, this experimental result raises questions about the trade-offs involved.

Delaying memory reuse means pages may remain unavailable while the kernel waits for an RCU grace period, potentially causing a regression when targeting user pages that are not yet mapped. As of October 13th, the branch containing these experimental patches was not yet merged into the mainline Linux kernel 7.3-rc6. Whether the patches will be integrated and on what timeline remains uncertain.

Torvalds' decision to utilize Claude Code represents a significant evolution in his perspective towards AI. Initially, in December 2023, Torvalds described AI as a potential aid to developers, focusing on bug identification. By late 2025, he became a strong advocate for AI, expressing interest in maintaining code, reviewing patches, and even generating new, serious code for Linux.

In January 2026, while working on a hobby project, Torvalds toyed with using AI to assist in coding for a Python audio visualizer. His recent comments, reported on October 9 following a discussion at Open Source Summit Europe in Prague, reflect a more enthusiastic stance. Torvalds now considers AI a valuable tool when used correctly, stating that it enhances programming enjoyment, albeit with caution.

The page-cache experiment demonstrates Torvalds' willingness to embrace AI as a tool, even if the benefits and drawbacks are still being evaluated.

Written by urgent.news from ZDNet's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at zdnet.com →

More in AI

More from Tuesday 13 October →