Does swap on zram free backing pages when pages are unswapped from it?
4
votes
3
answers
1680
views
Imagine a scenario where 2GiB is swapped out to zram and compresses down to 1GiB.
Once the memory pressure is alleviated and the 2GiB gradually become unswapped, does Linux free the 1GiB of pages that were used to store the compressed zram pages?
If so, does it defragment existing pages?
There must be multiple pages in a compressed page, what happens when all but one are unswapped? Do all pages stay in memory until that last page is freed aswell?
Asked by Atemu
(857 rep)
Feb 13, 2022, 08:58 AM
Last activity: May 20, 2022, 01:54 PM
Last activity: May 20, 2022, 01:54 PM