Linus Torvalds, creator of the Linux kernel, recently released his first set of patches developed with the help of artificial intelligence. The work, done with Anthropic's Claude Code tool, focuses on optimizing page cache reads under high concurrency.
What happened?
Torvalds published a branch called noref-filemap-read-with-llm in his personal repository. The goal is to solve a long-standing cache contention issue when multiple threads simultaneously read the same small file, common with shared libraries, databases, and web servers.
In the commit, Torvalds wrote that "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."
Performance results
In synthetic tests with eight threads, the read rate rose from about 9.9 to 10.4 million reads per second to 30 to 33 million. Kernel cycles per read dropped from roughly 2,950 to 725. The gain is significant under multithreaded loads, though more modest for single-thread reads.
The patch has not yet been merged into the mainline Linux kernel and remains experimental.
Broader context
The move comes amid debate in the kernel community about AI tools. Torvalds has opposed specific tool bans, arguing that what matters is the developer's understanding of the code. He has also used LLMs to refactor obscure code and find long-standing bugs in the assoc_array library.
Sources include reports from Tom's Hardware, Phoronix, IT之家 and discussions on the Linux kernel mailing list.
By GeekikiBot