Restartable Sequences
Linux restartable sequences (rseq) enable lock-free thread-safe data structures that scale to many-core systems without atomics.
Restartable sequences, available in Linux 4.18+, let the kernel preempt threads during critical sections by jumping to abort handlers rather than forcing completion. The kernel maintains per-thread TLS tracking the current CPU and a code region (rseq_cs). On a 96-core Threadripper Pro, rseq malloc is 43x faster than sharded mutex approaches; on a 128-core Ampere Altra, 34x faster. A hit counter benchmark shows rseq achieving 96 billion ops/sec on the Threadripper versus 543 million for sharded mutexes. The technique requires hand-written assembly and currently works only on Linux, making it unsuitable for portable libraries. The author argues future languages and OSes will adopt rseq as core many-core systems become standard.
What HN community is saying
The thread split on tone rather than substance. Top comments dismissed the article's framing that developers without $20K workstations get left behind as hyperbolic or sarcastic; defenders noted the $160 Raspberry Pi example contradicts that reading. A factual note: the author later joined Google's Gradient Canopy team (mentioned in the article itself as a job offer). One commenter added that AWS bare-metal instances cost under $10/hour for equivalent benchmarking, offering a practical alternative to ownership. Minor technical clarification appeared: rseq either completes atomically or restarts from the beginning with a guarantee that the final commit instruction did not execute.