Re: [PATCH -v4 1/2] memcg: move mem_cgroup_swappiness and vm_swappiness to mm/swap.h
Shakeel Butt <[email protected]> Thu, 23 Jul 2026 21:18:38 -0700
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 23, 2026 at 11:24:33AM +0800, Ridong wrote: > From: Ridong Chen <[email protected]> > > The per-memcg swappiness knob is v1-only; v2 always uses global > vm_swappiness and ignores the per-cgroup field. > > Both mem_cgroup_swappiness() and vm_swappiness are only used within > mm/ (memcontrol.c, memcontrol-v1.c, vmscan.c), so move them out of the > public include/linux/swap.h into the mm-private mm/swap.h. This keeps > unrelated declarations out of include/linux/swap.h. > > Guard memcg->swappiness with CONFIG_MEMCG_V1 as well, so v2-only > kernels drop the unused field. > > No functional change for v1; v2-only kernels drop the unused field. > > Acked-by: Johannes Weiner <[email protected]> > Reviewed-by: Barry Song <[email protected]> > Reviewed-by: Song Hu <[email protected]> > Signed-off-by: Ridong Chen <[email protected]> Acked-by: Shakeel Butt <[email protected]>