Linus Torvalds let Claude Code rewrite the Linux page cache read path, and a human reviewer caught the race

By Mark 8 min read 0 views

😁 Hello, super humans! Today’s lead is the best “AI wrote the code, humans saved the code” story we have seen in a while, and it comes from the Linux kernel itself. Grab a coffee: we go from an 18-month-old kernel problem to a 304 million reads per second benchmark, and the one bug that almost slipped through.

πŸ“° Quick Signals

  • 🧠 AI: xAI released Grok Voice 3.0, a speech-to-speech model with sub-second latency at $0.08 per minute, the same price as 2.0; agents on grok-voice-latest switched over automatically.
  • πŸ€– Robotics: Timken Precision Drives is combining strain wave, cycloidal, and planetary gearing with magnetic encoders into application-specific joint systems for humanoid developers.
  • πŸ’» Programming: Cloudflare’s newly acquired Vite+ reached 1.0 with GitLab CI support, hooks, and a tsup migration path.
  • ⚑ Electronics: An early ESP32 firmware now transmits as well as receives raw 2.4 GHz samples, demoed between an S3 and a C6, with 802.15.4 modulation reportedly next.
  • πŸ“‘ Telecom: Verizon’s CTO says AI could push today’s 9:1 downlink-to-uplink ratio toward 1:1 and that 6G needs an architectural breakthrough for it.

πŸ” The Big Story: Linus Torvalds let Claude Code rewrite the Linux page cache read path, and a human reviewer caught the race

If you build anything that reads files on Linux, this matters: the page cache sits under almost every read you do. And it is a live case study in what AI-assisted systems work actually looks like when the reviewers are kernel maintainers.

What happened: Torvalds submitted a 10-patch series aimed at a page-cache reference-counting bottleneck that developers have chased for over two years, after about 18 months of his own failed attempts, per The New Stack. He said Claude Code wrote the implementation, tests, and initial documentation under his direction while he ran the benchmarks. The series is on the kernel mailing list.

The details: The bottleneck was flagged in 2024 by Matthew Wilcox after it showed up in a customer workload. Earlier attempts copied data without holding a folio reference and validated afterward, which left races with reclaim and replacement. The new series adds a PG_rcu_free flag and uses RCU-delayed reclamation so a folio stays safe during the userspace copy, as long as that copy does not fault.

The numbers are synthetic and large. On an eight-thread laptop, an earlier eight-patch branch went from about 10 million to as many as 33 million reads per second, with kernel cycles per read falling from roughly 2,950 to 725 (laptop profiling per Hardware Busters). The revised series on a 64-thread Threadripper under heavy contention went from 13.3 million to 304 million reads per second, about 23x, with cycles per read dropping from nearly 20,000 to 735. Torvalds himself warned that real-world gains will be much smaller. There are costs too: the first version forced an expedited grace period once a CPU queued more than 1,024 pages, and reads into unmapped user pages took an extra fault, raising a 16-byte single-thread read from about 4,150 to 6,550 cycles.

Then review did its job. Wilcox questioned the flag and proposed alternatives; Torvalds rejected them, arguing the flag must be set while a folio can still be mapped into userspace. Kiryl Shutsemau then found a race in filemap_read_rcu_batch(): folio replacement followed by an i_size extension could expose data that was never written. Torvalds suggested reading the file size earlier and consolidating the folio checks, Shutsemau folded that into a revised patch, and development has now passed to Shutsemau.

flowchart LR
    A[Torvalds directs Claude Code] --> B[10-patch series with tests]
    B --> C[Synthetic benchmarks: up to 23x reads/s]
    C --> D[Maintainer review on LKML]
    D --> E{Race in filemap_read_rcu_batch?}
    E -->|Yes: stale i_size exposes unwritten data| F[Read file size earlier, merge folio checks]
    F --> G[Revised patch, handed to Shutsemau]
    E -->|No| H[Merge candidate]

Important

Our take: This is the right shape for AI in critical code: the model produced a lot of plausible, benchmarked work fast, and the bottleneck moved to people who understand folios, RCU, and truncate semantics. Nobody should read the 23x figure as a kernel speedup; read the race as the lesson. If your team is letting an agent write concurrency code, budget your review time for the subtle ordering bugs, because passing tests is exactly when those hide.

πŸ—žοΈ More News

🧠 AI

  • CoreWeave bond yields on some notes approached 15% and its shares fell sharply, turning the company’s debt into a live test of the AI infrastructure boom; CEO Mike Intrator called the reaction irrational and pointed to the contract backlog.
  • Anthropic reportedly booked $16.8B in quarterly revenue, up 50% quarter over quarter, as it prepares for a potential IPO (per the Financial Times).
  • OpenAI agreed not to use disputed trade secrets while Apple’s lawsuit proceeds; OpenAI denies the allegations and accuses a former employee who returned to Apple of sending confidential material to personal accounts.
  • A Semperis survey says 84% of organizations hit by ransomware reported attackers used AI somewhere in the attack, and 44% said criminals exploited their own AI systems.
  • Modal’s Series D reportedly lifts the inference and training infrastructure startup from about $4.65B to roughly $15B.
  • Subquadratic pitches a decision model that takes work away from frontier LLMs and claims a context window 12x larger than TypeSafe’s Jev.
  • Researchers planted a hidden message for rogue AI agents in a fleet, and the agents wrote back.

πŸ€– Robotics

  • ABB launched the IRB 1700 and IRB 1700ID at CIIF 2026 in Shanghai, claiming up to 20% shorter cycle times.
  • Reshape Automation’s Industrial AI Accuracy Index 2026 found leading AI models answered at most 52% of industrial parts questions correctly.
  • CEVA Logistics put Sereact’s AI-powered dual-arm robots into live returns handling for Zalando at sites in Germany and Poland.
  • Analog Devices is opening its Emerging Tech Hub to help robotics startups keep pace with innovation as they scale.

πŸ’» Programming

  • Google’s Antigravity SDK can now run local models, so agentic workflows can stay on the developer’s machine while cloud models handle higher-level tasks.
  • A critical, actively exploited Zimbra flaw (CVE-2026-73570) allows unauthenticated remote code execution through SNMP handlers; upgrade to 10.1.20 or disable SNMP.
  • Backstage 1.55 adds opt-in recovery for crashed or timed-out scaffolder tasks and ships breaking changes to the catalog, search, and TechDocs.
  • Cloudflare’s closed-beta OHTTP Gateway refuses to decrypt requests that arrive through Cloudflare, keeping client identity and request contents separate.

⚑ Electronics

  • ASM International argues that 3D device scaling puts new demands on materials and processes beyond lithography.
  • USBSID-Pico pairs a Raspberry Pi Pico with two real MOS SID chips and takes USB, MIDI, and ASID input, for people who prefer the sound of the real silicon.
  • A builder uses a waffle-based approach to check the health of a Wii U’s NAND flash, a common failure point on that console.
  • The FPGA Chronicles continues with an installment titled Ready To Probe.

πŸ“‘ Telecom

  • Vodafone’s Tim Boddy says SpaceX’s US push into mobile, including its 800MHz spectrum purchase, would be hard to replicate in Europe given spectrum norms, competition-focused regulators, and low mobile prices.
  • Plume launched Console, which lets ISPs build and oversee AI agents that find and fix home network problems using data from tens of millions of homes.
  • VodafoneThree aired a Β£1B savings plan that Light Reading calls a bad ad for open RAN.
  • A startup claims there is much more data to mine from cable’s legacy upstream.

πŸ‘¨β€πŸ’» Code Corner

Want to feel the cost of small reads yourself? This script times many tiny pread calls against a file that is already in the page cache, which is the exact path the kernel patch targets.

import os, tempfile, time

N = 2_000_000           # number of 16-byte reads
SIZE = 4 * 1024 * 1024  # 4 MiB file, small enough to stay in page cache

with tempfile.NamedTemporaryFile(delete=False) as f:
    f.write(os.urandom(SIZE))
    path = f.name

fd = os.open(path, os.O_RDONLY)
os.pread(fd, SIZE, 0)  # warm the page cache

start = time.perf_counter()
for i in range(N):
    os.pread(fd, 16, (i * 16) % (SIZE - 16))
elapsed = time.perf_counter() - start

print(f"{N / elapsed / 1e6:.2f} M reads/s ({elapsed / N * 1e9:.0f} ns per read)")
os.close(fd)
os.unlink(path)

Run it before and after a kernel update to see your own number; Python overhead dominates, so treat it as a relative baseline, not a kernel benchmark.

Tip

For a cleaner measurement use fio with --ioengine=psync --bs=16 --rw=randread on a small cached file and perf stat to count cycles per read.

🧰 Toolbox

  • fio: the standard flexible I/O tester, handy for reproducing small-read and page cache benchmarks.
  • perf: Linux profiling tool for counting cycles, cache misses, and kernel hot spots per workload.
  • Inferock-bench: a local proxy that records token usage, failures, and retries across OpenAI, Anthropic, Gemini, and OpenRouter-compatible calls so you can compare billed usage with actual activity.
  • NVIDIA cuPotential: a CUDA-X library that helps agents simulate interactions between atoms and molecules.

πŸ› οΈ Build of the Week (rotating)

USBSID-Pico: an open-source hardware board that connects original MOS SID sound chips to a modern computer.

  • Difficulty: Intermediate
  • Parts: Raspberry Pi Pico (RP2040), two MOS SID chips (or a hardware SID replacement), USB and MIDI connectivity
  • Why we like it: It takes input over USB (CDC, WebUSB, WebSerial), MIDI, and ASID, so you can drive real Commodore 64 silicon from a browser, and it is certified open source hardware.

πŸ“š From the Blog

πŸ˜€ The Bot Says…

The AI wrote the patch in hours, the humans found the race in days, and the 18 months before that were all human. Review is still the long pole.


That’s all for today! Reply and tell us: would you let an agent touch your concurrency code?