Speaker
Description
Compressed RAM (where hardware offloads compression) presents a particularly novel problem for the kernel: the device fundamentally lies about its true capacity - while the kernel is written to assume any struct page it can get will always be backed by real capacity.
Unlike zswap/zram - these devices provide cacheline/byte access to compressed memory, their memory can remain page-table mapped and page-cache present without generate faults on read-access (no COW, no software decompression step etc).
Lets discuss what it would take to formalize support for a compressed RAM service that otherwise "looks like" normal memory (migratable, mappable, page-cache-able - but maybe not directly writable).
All but one feature required to achieve support already exists in the kernel (or has existed at one time).
- Anon Memory support: Page Table Write Protection (COW, KSM)
- Page Cache support: Clean Cache (clean page eligible only)
- Reclaim and Demotion
- Memory Ballooning (dynamic sizing)
- Free Page Reporting (stale data trimming)
- Memory Tiering (Hotness / NUMA Balancing)
- Strictly controlled NUMA memory allocation (private nodes)
I will present a tested compressed ram service (mm/cram.c) that achieves near-native performance to DRAM under TAOBench and FIO benchmarks, and has been tested under most in-tree filesystems for pagecache correctness.