zram is now able to write incompressible page to a block device (instead of wasting dram): https://lwn.net/Articles/726444/
In https://www.kernel.org/doc/Documentation/blockdev/zram.txt
"""
= writeback
With incompressible pages, there is no memory saving with zram.
Instead, with CONFIG_ZRAM_WRITEBACK, zram can write incompressible page
to backing storage rather than keeping it in memory.
User should set up backing device via /sys/block/zramX/backing_dev
before disksize setting.
"""
Using this feature instead of Zswap has a security advantage: we don't need to open the door to block device based swap, we can still limit swap to zswap device.
1 - we first need to monitor the % of swapped pages that are deemed incompressible during test/usual workload, to see it is worthwhile.
[there is a patch https://lwn.net/Articles/750174/ about memory tracking, I wonder if it needs to be applied to track that information]
2 - I checked backing_dev can be a regular file, be sure it is encrypted like zswap backing file was.
3 - measure difference in number of tab open and tail tab latency switch with this change.
Comment 1 by sonnyrao@chromium.org
, Sep 21