![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://hexbear.net/pictrs/image/e76e7bf7-85f8-43d1-a7bb-21febcc54a5f.jpeg)
am i right that you can create zswap block devices and mount them like with zram? (eg. mounting /var/tmp)
zswap is a “front swap”, it needs a backing swap to function that’s crucial to the design. It automtically goes in front of all the swaps you have enabled.
You could probably put the backing swap on a loop device on a tmpfs, but I don’t know how it will handle the loopback. It’s a better idea to put it on disk. It can be a slow or write-limited disk, it will not get used much. You definitely should not use zram and zswap at the same time.
Huh, when I set it up
zsmalloc
wasn’t finished and never deallocated. But it seems that today it’s the right choice! Thanks.