Linus Torvalds publishes kernel patch written with AI

Linus Torvalds released his first LLM-assisted Linux kernel patch to tackle cache contention. He reported 23x gains in a synthetic test but warned real-world benefits will be much smaller and remain under review.

.
Linus Torvalds publishes kernel patch written with AI

2 Minutes

Follow on Google

Linus Torvalds published, for the first time, a Linux kernel patch written with the assistance of a large language model. In a dedicated synthetic test he reported a 23-fold performance improvement.

The patch is in the kernel's development branch and targets long-standing cache contention that occurs when multiple processors concurrently read the same file.

That contention can appear when serving shared libraries, databases and web servers. Several developers previously attempted fixes, but results differed and none produced a comprehensive solution.

Torvalds published his initial draft in early 2024 and said he had been using it on his personal laptop. He recently decided to "try to really solve this with an LLM," and the LLM-assisted changes are now available in a development branch.

In his synthetic test he reported a 23x improvement, but he cautioned the real-world effect will be much smaller because "no real workload" produces such numbers. He said servers will likely benefit more than desktops.

Torvalds has in recent years taken a broadly supportive stance toward LLM tools in the kernel's review-driven environment. Months ago he said he would "stomp his foot" in response to AI opponents and noted the automated code-review tools used by the kernel team catch basic programming errors better than humans.

At the same time, AI agents have become adept at finding common security defect patterns, and developers said the linux-security mailing list became "unmanageable" in the early months of the year. Linux is addressing bugs at a rapid pace, roughly 2,000 CVE fixes per release.

That pressure has pushed the team to remove older hardware drivers that attract many security reports despite having few users.

The new patch has not ended the dispute between pro- and anti-AI camps in the kernel community, and discussion continues. The patch remains under review in the development branch.

Julia Bennett
"Hi, I’m Julia — passionate about all things tech. From emerging startups to the latest AI tools, I love exploring the digital world and sharing the highlights with you."

Leave a Comment

Comments

No comments yet. Be the first.