Re: Path forward for Virtualized Swap?
From: Johannes Weiner
Date: Tue Sep 08 2026 - 14:38:05 EST
On Mon, Sep 07, 2026 at 01:51:31PM +0800, Kairui Song wrote:
> Where I've ended up is that unbounded growth is a real concern. On a
> host with no memcg limit (root cgroup, and most desktop and embedded
> setups), an unlimited pool means usage can keep growing, with no
> admin visible ceiling at all. I'm not attached to xswap's percent of RAM
> knob specifically, but I do think some kind of bound makes sense.
Swap space is just process virtual address space, no?
Swap entries already have one or more page table entries pointing to
them, which in turn are managed by trees of vm_area_structs. That
means rlimits apply, overcommit protection applies, and OOM killer
attribution works as well (oom_badness()).
Shmem has its own defaults and limit interface on address space.
I'm not quite seeing how the swap space needs an additional limit. How
could users break things in unique new ways without it?
It would be good to spell out that vector before discussing numbers :)