Exploring a real life RCU use case for Rust
summary
A real allocator backend for Zswap called Z block divides blocks into equal slots and keeps a list of partially empty blocks; C uses an RCU list variant that benchmarks faster than the spinlock version. A Rust prototype that mirrors the C RCU lists works but is ugly and unsafe; the real gaps are safe deferred-free (kfree_rcu), a trait bound to expose an rcu_head field, and a minimal list_add_rcu/list_del_rcu API that avoids a full generic RCU list implementation.
AI-written summary · about
chapters (4)
- 0:00Introduction and problem
- 2:10RCU use case in C
- 10:02Rust implementation challenges
- 16:56Q&A and summary
related talks
50mRusty Swapping: Rewriting a zswap Backend in Rust
50mRusty Swapping: Rewriting a zswap Backend in Rust
39mRusty Swapping: Rewriting a Zswap Backend in Rust
39mRusty Swapping: Rewriting a Zswap Backend in Rust
01h 08mRead, Copy, Update, then what? RCU for non-kernel programmers
28mRevisit Multi-Reader Synchronizations for Scalable Applications
55m“A lock-free concurrency toolkit for deferred reclamation and optimistic speculation"
19mVerifying General-Purpose RCU for Reclamation in Relaxed Memory Separation Logic
