Re: [RFC PATCH v2 0/4] mm/swap: reserve swap areas for deliberate offload
From: Matthias Goergens
Date: Mon Sep 28 2026 - 11:31:28 EST
Hi Kairui,
> Just like we already have a "swappiness=" parameter in the reclaim
> interface, perhaps adding a "swap.tier=" would be better and much
> cleaner to achieve the same goal? Based on Youngjun's work here:
> https://lore.kernel.org/all/20260916183437.2946306-1-youngjun.park@xxxxxxx/
Thanks, I think that's the right base. I tried it: on top of
Youngjun's v11, a "swap.tier=" argument to memory.reclaim is about 40
lines. In a VM with zram at a higher priority than a disk swap
device, and a cgroup whose tier mask allowed only the disk, ordinary
reclaim in that cgroup stayed on the disk, while memory.reclaim with
"swap.tier=" pointing at zram went to zram only.
What it doesn't cover yet is reclaim outside any configured cgroup:
under global pressure, a cgroup nobody configured still reached the
zram tier. So for v3 I'd like to add a system-wide limit on which
tiers pressure reclaim may use, on top of the per-cgroup settings.
I'll wait for Youngjun's v12 and build on that.
Thanks,
Matthias