Rusty Swapping: Rewriting a zswap Backend in Rust
summary
Rewrites zswap backend zblock in Rust and reimplements allocation algorithms, producing a working Rust module that matches C performance in tests (qemu/x86_64) and compares favorably against existing backends: zblock is on par with zbud and usually faster than zsm. Shows concrete layout: 48-byte header, example splitting 8K into 740-byte slots with a 4‑byte remainder, compressed pages range 2–496 bytes. Uses bindgen manually, struggles with Rust kernel toolchain pinning and spinlock API, and cannot be submitted as Rust for arm32 targets so C remains the ship candidate.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:47zswap and backend allocators
- 10:56Z block allocator design
- 16:51Motivation for Rust rewrite
- 21:24Rust in Linux kernel challenges
- 29:42Z block in Rust: registration
- 32:35Z block algorithms in Rust
- 34:03Locking in Rust
- 36:37C versus Rust comparison
- 39:58Summary and future
- 44:57Q&A
related talks
50mRusty Swapping: Rewriting a zswap Backend in Rust
39mRusty Swapping: Rewriting a Zswap Backend in Rust
39mRusty Swapping: Rewriting a Zswap Backend in Rust
33mMoving kernel swapping infrastructure to Rust
17mExploring a real life RCU use case for Rust
57mFast encrypted backups with Rust
26mAllocating Less: Really Thin Rust Cloud Apps
27mUsing Rust in the binder driver
