Linus Torvalds experimented with Anthropic's Claude Code assistant to write experimental patches for the Linux kernel, focusing on page cache reading without folio references.
The October commit details performance measurements and implementation under his direct supervision.
Torvalds used a digital programming assistant from Anthropic, Claude Code. Under his instructions, the artificial intelligence system wrote eight fixes and test programs, and also helped with the initial text of the announcement.
The goal was to improve the way Linux reads data that is temporarily stored in memory. The experimental changes allowed data to be read without having to constantly update additional counters, reducing delays when different parts of the computer try to read the same information.
The changes were tested on Torvalds' personal laptop, using an Intel Core i7-8565U processor and ext4 storage, with some security settings disabled.
In tests with eight threads reading small data repeatedly, the speed tripled from about 10 million reads per second to 30 to 33 million. With four threads on separate cores, the performance went from about 9 to 12 million to 25 to 26 million. Even in a single-thread test, the speed went from about 8 million to almost 9 million reads per second.
Torvalds guided the process, reviewed the code, and ran performance benchmarks himself. He noted, however, that there are several unresolved issues, such as memory management behavior, potential incompatibilities, risk of negative side effects, and question marks over overall behavior.
The code is available as an experiment called noref-filemap-read-with-llm, based on Linux version 7.3-rc6, and has not been officially integrated into the mainline operating system.