60 Adaptive userspace spinlocks with rseq
summary
Proposes exposing thread run state to userspace via rseq so userspace can do cheap, syscall-free checks and only spin when the lock owner is actually running; adds a proposed sched_state field (or separate cacheline) updated by the scheduler, discusses RCU fences and libc integration to avoid reading reclaimed thread memory, and limits applicability to private futexes (no cross-process shared mutexes yet). Benchmarks are not shown; correctness and page‑fault edge cases are discussed.
AI-written summary · about
chapters (14)
- 0:00Introduction to adaptive spinlocks
- 1:08Problem with mutex locks and futex
- 2:13RSEQ role in scheduler communication
- 3:55Trade-offs in struct layout design
- 5:59Robustness and RCU memory barriers
- 7:27Limitations for shared memory locks
- 8:36Future directions for process support
- 9:21Page fault handling for state
- 11:03Performance benefits and benchmarks
- 13:52Kernel spinning vs user space heuristics
- 14:33Microbenchmark testing results
- 15:15Power management considerations
- 15:58Action items and next steps
- 16:40Robust futexes and owner lookup
related talks
28mRevisit Multi-Reader Synchronizations for Scalable Applications
25mAdaptive futexes: spin if the owner is still running on another CPU
44mRestartable Sequences: Scheduler-Aware Scaling of Memory Use on Many-Core Systems
01h 08mRead, Copy, Update, then what? RCU for non-kernel programmers
15mEnemy of the State, Understanding the Many Flavors of Race Conditions
37mTicket Spinlocks in Zephyr RTOS: What, Where & Why
55m“A lock-free concurrency toolkit for deferred reclamation and optimistic speculation"
51mFrom Linux Threads To ForkJoinPool
