Re: Virtual Swap Sync
From: Rik van Riel
Date: Fri Dec 04 2026 - 15:33:01 EST
On Fri, 2026-12-04 at 14:44 -0500, Johannes Weiner wrote:
> On Fri, Dec 04, 2026 at 11:30:46AM -0700, Nhat Pham wrote:
> > On Tue, Dec 1, 2026 at 10:27 PM Chris Li <chrisl@xxxxxxxxxx> wrote:
> > >
> > > On Mon, Nov 30, 2026 at 4:26 AM Nhat Pham <nphamcs@xxxxxxxxx>
> > > wrote:
> > > > Ah I see. It's logical footprint, but enforced on an
> > > > allocation/used
> > > > basis rather than mapping (i.e address space reservation, which
> > > > existing vm.overcommit modes regulate).
> > > >
> > > > I think swap sizing is still the wrong interface for this.
> > > > IMHO, it's
> > > > a crude emulation, with some downsides:
> > > >
> > > > Say the desired logical memory limit is 4GB. We have 2GB of
> > > > physical
> > > > memory limit, so we emulate that by setting swap size to 2GB.
> > > > Now say
> > > > I have a hot file cache of 1GB, and 3GB of cold anon. That
> > > > should be
> > > > allowed, but you'd thrash prematurely or OOM because you can
> > > > only
>
> It shouldn't be a vswap blocker. This is as incremental as it gets.
> No memsw setup is broken, no zram setup is broken.
Agreed. The current upstream kernel does not support the
total logical memory limit functionality, so this should
not be a prerequisite for merging vswap.
This is something we can integrate later.
--
All Rights Reversed.