Re: Virtual Swap Sync
From: Nhat Pham
Date: Thu Dec 03 2026 - 17:12:20 EST
On Sun, Nov 22, 2026 at 8:31 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
>
> On Thu, Nov 5, 2026 at 2:06 PM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
> >
> > Hi folks,
> >
>
> Hi folks - thanks everyone for attending. :)
>
> I summarized the points we discussed below - please let me know if I
> missed anything or misunderstood a point.
>
> * Control interface: Google is interested in a knob to cease zswapping
> (which already exists and will still work in vswap world). Kairui has
> a use case for remapping all swapped-out pages.
>
> Vswap currently bypassed when zswap is off; per-cgroup selection could
> be added as concrete use case arises (for e.g migration/compaction).
>
> David objected that a virtual swap abstraction should not carry a
> swapoff interface per se. Folks also asked whether making vswap a
> mandatory layer would make the implementation cleaner (Nhat will
> explore this direction and follow up on this).
As promised, I gave this a shot: I took my vswap patch series, and
build on top of it a couple more patches to make vswap mandatory and
rip out all the shared path. It massively cut down on the amount of
vswap checks (the only ones remained are allocator path, for the most
part), and has a -500 delta LoC overall"
https://lore.kernel.org/all/20261203220010.1302207-1-nphamcs@xxxxxxxxx/
I then run 4 benchmarks x 4 different kinds of swap backend (zswap,
zswap shrinker, SSD swap, zram). Numbers are in the cover letter.