News
Torvalds handed over the first AI-assisted kernel patch: concurrent file reading is about 3 times faster. Technology media lwn reported that Linus Torvalds, the father of Linux, launched a new branch called noref-filemap-read-with-llm in his personal Git repository, officially handing over his first large-scale kernel patch.
2 min read
Source: Telegram AI频道
Torvalds handed over the first AI-assisted kernel patch: concurrent file reading speeds up by about 3 times. Technology media lwn reported that Linus Torvalds, the father of Linux, launched a new branch called noref-filemap-read-with-llm in his personal Git repository and officially handed over his first series of kernel patches developed with the assistance of a large language model. This developer who usually only maintains code on the master branch has rarely opened an experimental branch with the "llm" suffix, and the helper behind the scenes is Anthropic's AI programming tool Claude Code. The patch submitted by Torvalds on this branch on October 13 was titled "Improving page reference counting scalability" and targeted an old problem in Linux memory management. When multiple threads read the same file at high frequency and in minute quantities at the same time, the traditional mechanism will repeatedly trigger the reference count update of the page cache, and the multi-core CPU will fall into a serious competition state. He admitted that the core code, test procedures, vulnerability review and even the first draft of the announcement document for this set of patches were all completed under his personal guidance and in collaboration with Claude Code. Actual measurement of 8 threads: throughput tripled, clock cycles cut by 70%. After turning off some local security protections, Torvalds ran data under a test load of 8 threads reading the same file concurrently: the read throughput jumped directly from the original 9.9 million to 10.4 million times per second to 30 million to 33 million times, an increase of about 3 times; the kernel clock cycles consumed by a single read also plummeted from about 2950 times to 725 times. However, the patch is still in the experimental branch and has not yet been integrated into the official mainline of Linux 7.4. What’s more worth mentioning is that at the recent maintainer summit and another cleanup of the assoc_array code base, Torvalds also used LLM to reconstruct old code and uncovered three hidden bugs that had been lurking in the Linux system for 13 years and could be traced back to the first submission in 2013. AI-assisted kernel writing seems to have moved from "speed-up" to "demining". via AI News (author: AI Base)