January 16, 2026
Read once, argue forever
Read_once(), Write_once(), but Not for Rust
Rust’s read-once dreams hit a wall as devs fear split-brain Linux
TLDR: A Rust patch to add READ_ONCE/WRITE_ONCE sparked pushback from kernel Rust devs who prefer clear atomic operations. Commenters worry about a split ecosystem and laugh at scarce docs, while others say Rust’s approach breaks key guarantees—making future Linux concurrency choices a big deal.
Linux drama alert: a new Rust patch by Alice Ryhl tried to bring C’s beloved READ_ONCE()/WRITE_ONCE() into Rust by mapping them to Rust’s read_volatile and write_volatile. Sounds simple, right? Not so fast. Kernel Rust devs pushed back hard, with Gary Guo and Boqun Feng arguing for clearer, explicit atomic operations from Rust’s Atomic API instead of what Boqun called a “band aid.” The vibe: less magic macros, more intentional code.
Commenters turned up the heat. One warned that swapping in “relaxed” atomics (a lighter synchronization mode) is flat-out wrong, citing special CPU rules and the Linux memory model—basically, the “how computers even keep their facts straight” rulebook. Another wondered if this creates a two-tier Linux world: C folks using one approach, Rust folks another. Naming debates popped up (“why not just call them atomic_read/atomic_write?”), while a fan-favorite meme moment landed when someone quoted LWN’s line about these being “important” and “almost entirely absent from documentation” and admitted it “made me chuckle.”
The big tension: Rust wants clarity and safety; C code relies on old-but-proven tricks. If Rust doesn’t get READ_ONCE/WRITE_ONCE, future kernel code might look—and behave—differently across languages. Cue ominous music and the split-brain Linux jokes.
Key Points
- •READ_ONCE() and WRITE_ONCE() enforce single, atomic accesses and limit compiler reordering but do not impose CPU ordering, unlike smp_load_acquire().
- •These macros were added in Linux 3.18 (2014); WRITE_ONCE() was originally ASSIGN_ONCE() and renamed during the 3.19 cycle.
- •Alice Ryhl proposed Rust implementations on December 31, 2025, aiming to replace volatile reads and updated struct file f_flags to use READ_ONCE().
- •The Rust implementations use macros that ultimately call read_volatile() and write_volatile().
- •Kernel Rust developers Gary Guo and Boqun Feng objected, advocating explicit atomic operations with relaxed ordering via the Rust Atomic crate and kernel Atomic module, citing complex semantics of READ_ONCE()/WRITE_ONCE().