Re: [PATCH -next] memcg: move mem_cgroup_swappiness to memcontrol.h

From: Johannes Weiner

Date: Fri Jul 10 2026 - 08:22:04 EST


On Fri, Jul 10, 2026 at 07:12:24PM +0800, Ridong wrote:
> From: Ridong Chen <chenridong@xxxxxxxxxx>
>
> The per-memcg swappiness knob is v1-only; v2 always uses global
> vm_swappiness and ignores the per-cgroup field.
>
> Guard memcg->swappiness with CONFIG_MEMCG_V1, and move the helper
> to memcontrol.h where it belongs.
>
> No functional change for v1; v2-only kernels drop the unused field.
>
> Signed-off-by: Ridong Chen <chenridong@xxxxxxxxxx>

Nice.

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>