Re: Path forward for Virtualized Swap?

From: Rik van Riel

Date: Sat Sep 26 2026 - 21:00:46 EST


On Sat, 2026-09-26 at 11:27 -1000, Chris Li wrote:
> On Fri, Sep 25, 2026 at 5:41 AM Johannes Weiner <hannes@xxxxxxxxxxx>
> wrote:
>
> >
> > (2) The use case we have. Use memory.swap.max to divide a finite
> > space
> > in storage. We only have so much space on disk, and we need to
> > manage
> > fair access. Note that this isn't about speed. We have a mix of
> > containers where some use writeback and others do not. The ones who
> > write back to the swapfile need to be able to get their fair share
> > -
> > not more, not less. Including something that doesn't actually
> > consume
>
> Just want to make sure I understand correctly. Do you mean the fair
> share of compressed memory used in the zswap case?
>
Compressed zswap memory is already accounted for
under cgroup.memory.max.

Compressed zswap memory sits under memory.max
together with anonymous, file, and slab cache
memory.

We do not need or want another limit there, 
though I understand other people do.

The fair resource use from memory.swap.max
is to control how much of the fixed swap file
(or swap partition) space each cgroup gets.

--
All Rights Reversed.