logoalt Hacker News

CoolGuyStevetoday at 2:15 PM3 repliesview on HN

Would be nice if zswap could be configured to have no backing cache so it could completely replace zram. Having two slightly different systems is weird.

There's not really any difference between swap on disk being full and swap in ram being full, either way something needs to get OOM killed.

Simplifying the configuration would probably also make it easier to enable by default in most distros. It's kind of backwards that the most common Linux distros other than ChromeOS are behind Mac and Windows in this regard.


Replies

cdowntoday at 2:52 PM

This is actually something we're actively working on! Nhat Pham is working on a patch series called "virtual swap space" (https://lwn.net/Articles/1059201/) which decouples zswap from its backing store entirely. The goal is to consolidate on a single implementation with proper MM integration rather than maintaining two systems with very different failure modes. It should be out in the next few months, hopefully.

show 1 reply
jcalvinowenstoday at 3:25 PM

> Would be nice if zswap could be configured to have no backing cache

You can technically get this behavior today using /dev/ram0 as a swap device, but it's very awkward and almost certainly a bad idea.

show 1 reply
adgjlsfhk1today at 2:42 PM

Very much agreed. I feel like distros still regularly get this wrong (as evidence, Ubuntu, PopOS and Fedora all have fairly different swap configs from each other).