Rusty Swapping: Rewriting a Zswap Backend in Rust
summary
A Zswap backend (zblock) is reimplemented in Rust, registered via kernel stubs, and bench‑marked against the original C zblock, zsm and zbd. Build requires specific Rust compiler and bindgen versions and early kernels lack arm32 support (arm64 merged in 6.9), which blocks mainline submission. Rust output often has a smaller binary size when stripped, shows faster page load but slower page store than the C zblock, has slightly longer compile time, uses fewer unsafe regions, and otherwise works reasonably well.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:48Consulo group's Linux kernel work
- 5:45Zswap and allocators overview
- 8:40Zblock allocator details
- 13:22Rust for kernel development
- 16:37Rust in Linux kernel setup
- 19:51Rust kernel challenges
- 22:01Rewriting Zblock in Rust
- 25:37Rust atomics and locks
- 27:01C versus Rust performance
- 30:42Testing Rust Zblock
- 31:26Summary and future
- 33:55Q&A
related talks
39mRusty Swapping: Rewriting a Zswap Backend in Rust
50mRusty Swapping: Rewriting a zswap Backend in Rust
50mRusty Swapping: Rewriting a zswap Backend in Rust
33mMoving kernel swapping infrastructure to Rust
17mExploring a real life RCU use case for Rust
27mUsing Rust in the binder driver
42mUpdate on Rust in Zephyr
20mAn Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise
