Re: [RFC PATCH v2 0/7] mm, swap: Virtual Swap Space (Swap Table Edition)
From: YoungJun Park
Date: Sun Jun 14 2026 - 04:20:28 EST
...
> * Integration with swap.tier by Youngjun (see [12]). For now, I'm
> leaning towards opting out the vswap device from swap.tier entirely, and
> treat it as a special device. Integrating it with swap.tiers will
> benefit the cases where you want some cgroups to skip vswap for fast
> swap devices (pmem), whereas other should go through zswap first. But
> most other use cases, either the overhead of vswap will be acceptable
> (or not the bottleneck), or we can just disable CONFIG_VSWAP entirely :)
>
> Youngjun, may I ask for your thoughts on this?
Hi Nhat,
Tier 1: VSWAP, Tier 2: ZSWAP ...
I don't see any problem applying the desired functionality with the
currently proposed mechanism and interface. With this, a user would be
assigned the default Virtual -> RAM swap tier, and the overall picture
becomes one where swap tiers are composed according to the priority
setting.
A few more thoughts came to mind.
Shakeel also proposed a per-tier max for the swap tier interface.
https://lore.kernel.org/linux-mm/aiw2p5ANjsQUCIHA@xxxxxxxxx/
However, for vswap, rather than treating it as a case for limiting the
amount via such a per-tier max, I think the current interface is the
better fit. (But, as Shakeel mentioned, if we only allow the limit
to be set to 0 or max, the usage could end up being the same. I'm still
thinking this part through.)
I have a few other thoughts as well, but I plan to raise those points in
the swap tier discussion thread instead. Please take a look at the
related thread, and let me know if you have any opinions. :)
And I'll share more if other thoughts come to mind
Thanks,
Youngjun Park