Re: [PATCH] mm/vmscan: when the swappiness is set to 0, memory swapping should be prohibited during the global reclaim process

From: Shakeel Butt
Date: Thu Feb 27 2025 - 14:16:51 EST


On Thu, Feb 27, 2025 at 10:34:51PM +0800, ying chen wrote:
> When we use zram as swap disks, global reclaim may cause the memory in some
> cgroups with memory.swappiness set to 0 to be swapped into zram. This memory
> won't be swapped back immediately after the free memory increases. Instead,
> it will continue to occupy the zram space, which may result in no available
> zram space for the cgroups with swapping enabled. Therefore, I think that
> when the vm.swappiness is set to 0, global reclaim should also refrain
> from memory swapping, just like these cgroups.
>
> Signed-off-by: yc1082463 <yc1082463@xxxxxxxxx>

It seems like you are still on memcg-v1. What is stopping you to move to
memcg-v2 and use memory.swap.max = 0?