Re: [RFC PATCH 00/10] mm/swap: ghost swapfile with backend switching via Redirect entries
From: Nhat Pham
Date: Thu Jul 16 2026 - 12:59:02 EST
On Thu, Jul 16, 2026 at 9:49 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
>
> On Wed, Jul 15, 2026 at 4:04 PM Chris Li <chrisl@xxxxxxxxxx> wrote:
>
> Hi Chris. I have some thoughts on this - let me know what you think.
>
> I understand the memory overhead discussion here. In the case where
> vswap slot is backed by a real swapfile, I have not figured out a way
> to make the overhead disappear yet. The damn rmap is very annoying - I
> have some strategies to get around it for certain operations, but none
> of it can be done without a full fledged patch series of its own.
>
> However, with the ghost zswap swapfile backend specifically, I think
I think I this is a bit confusing on my part. Let me clarify - I did
not mean having vswap backed by ghost zswap swapfile backend here.
What I meant here was, "in order to support the use case similar to
ghost zswap swapfile", i.e zswap-without-writeback.
Vswap extended cluster struct is just the normal swap cluster struct,
with an extra array to hold the backend, which we can use to store
reference to struct zswap entry. If you don't do any writeback, that's
sufficient - there will be no rmap etc. extra overhead. The rest of
swap metadata follows Kairui's swap table design (and any advances he
made in optimizing the overhead will be applied immediately, since I
pretty much did not change the swap cache and swap count operations at
all).