A (Simple) Hazard Pointer Update
summary
A variant called simple hazard pointers (shazptr) offers an intuitive API that uses a shared per-CPU hazard pointer slot and a wildcard mechanism to avoid allocating slots before use. Shazptr claims lower updater wait times and smaller memory footprint than RCU, and applying it to lockdep dynamic key unregistration yields ~20x speed-up while avoiding IPIs. Microbenchmarks show better updater latency with reasonable reader overhead; the implementation uses a per-CPU slot plus a scanner thread and relies on preemption/interrupt-disabled regions, producing occasional long tail latency in worst-case scans.
AI-written summary · about
chapters (10)
- 0:00Introduction and concepts
- 2:37Hazard pointer mechanics
- 7:47When to use hazard pointers
- 8:21API usage and synchronization
- 20:21Lockdep case study
- 24:17Handling allocation failure
- 24:57Nested readers and wildcards
- 25:58Implementation design choices
- 29:26Performance evaluations
- 35:47Q&A and concluding remarks
related talks
58m“The Landscape and Exciting New Future of Safe Reclamation for High Performance”
55m“A lock-free concurrency toolkit for deferred reclamation and optimistic speculation"
01h 01mWill Your Code Survive the Attack of the Zombie Pointers?
14mLeveraging Immutability to Validate Hazard Pointers for Optimistic Traversals
01h 08mRead, Copy, Update, then what? RCU for non-kernel programmers
24mPREEMPT_RT Q&A with tglx
15mMemoryTrap: Booby Trapping Memory to Counter Memory Disclosure Attacks with...
23mCPU Isolation state of the art
