On 05.08.25 18:56, Nhat Pham wrote:
On Tue, Aug 5, 2025 at 3:47 AM David Hildenbrand <david@xxxxxxxxxx> wrote:
On 05.08.25 02:29, SeongJae Park wrote:
When zswap writeback is enabled and it fails compressing a given page,
the page is swapped out to the backing swap device. This behavior
breaks the zswap's writeback LRU order, and hence users can experience
unexpected latency spikes. If the page is compressed without failure,
but results in a size of PAGE_SIZE, the LRU order is kept, but the
decompression overhead for loading the page back on the later access is
unnecessary.
Keep the LRU order and optimize unnecessary decompression overheads in
the cases, by storing the original content in zpool as-is.
Does this have any effect on the movability of the given page? IOW, does
page migration etc. still work when we store an ordinary page of an
shmem/anon folio here?
Good question. This depends on the backend allocator of zswap, but the
only backend allocator remaining (zsmalloc) does implement page
migration.
Right, but migration of these pages works completely different than
folio migration.
But I think the part I was missing: we are still performing a copy to
another page, it's just that we don't perform any compression.
So I guess *breaking* movability of folios is not a concern.
But yeah, whether these "as is" pages are movable or not is a good
question as well -- in particular when zsmalloc supports page migration
and the "as is" pages would not.
Maybe someone familiar with the code could shed a light on that.
--
Cheers,
David / dhildenb