Stupid RCU Tricks: When Read-Copy-Update Goes Off the Rails (and Why That’s Charming)

April 19, 2026
Close-up of wooden Scrabble tiles spelling 'UNVERNUFT' against a blurred background.
Photo by Markus Winkler on Pexels

RCU — the subtle concurrency trick that sneaks into programs and surprises you mid-debug — is back in the spotlight. Paul McKenney’s recent write-up, "Stupid RCU Tricks: Corner-Case RCU Implementations," pulls a few eyebrow-raising examples out of the attic: yes, you can implement grace periods with a calendar and a prayer. It has been reported that Fedor Pikus even remarked that many developers are already using the RCU approach without realizing it. Charming? Terrifying? Both.

Timed-wait RCU

One suggested corner case: throw away the bookkeeping and just wait. Really. A synchronize_rcu() that sleeps a fixed interval — McKenney reproduces the famous toy implementation schedule_timeout_uninterruptible(15 * HZ) — assumes all pre-existing readers finish after the timeout. Van Jacobson supposedly joked that 15 seconds would do for a research UNIX variant; Aju John allegedly proposed a ten-minute vnode reclamation timeout for DEC OSF/1. These are blunt instruments: they can work in hard real-time systems where readers are constrained, but in general-purpose kernels they’re a disaster waiting to happen. Low overhead? Sure. Correct? Not reliably.

Fixed-buffer RCU

If time feels crude, try space. It has been reported that the Linux KASAN quarantine and the rcutorture workload both implement a kind of address-space-based grace period: freed objects are held in a fixed-size buffer to increase the odds a stray reader will catch the use-after-free. McKenney points out that this is effectively treating “not yet reallocated” as a proxy for “reader finished.” Clever heuristic, fewer false negatives — but again, probabilistic, not provable. It’s a band-aid that masks race windows rather than closing them.

These tales are a reminder: smart shortcuts can be seductive. They shine because they’re simple and fast, and they make engineers grin — until they don't. Do you want a neat hack that usually works, or a provably safe mechanism that’s a bit more work? RCU’s flexibility is its power and its peril. For the curious and the cautious alike, McKenney’s post is worth a read; it has been reported that the original write-up and the subsequent discussion are available on people.kernel.org and Lobsters.

Sources: people.kernel.org, Lobsters