[PATCH 0/2] mm: fix node reclaim swappiness handling
Ridong Chen <[email protected]>
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
From: Ridong Chen <[email protected]> The per-node proactive reclaim interface (/sys/devices/system/node/nodeX/reclaim) accepts a swappiness parameter, but it was silently ignored when CONFIG_MEMCG is disabled. The root cause is that sc_swappiness() had separate implementations for CONFIG_MEMCG and !CONFIG_MEMCG, and the latter never checked proactive_swappiness. Patch 1 moves mem_cgroup_swappiness() from swap.h to memcontrol.h and makes it handle both CONFIG_MEMCG and !CONFIG_MEMCG cases in a single inline function. This is a prerequisite for unifying sc_swappiness(). Patch 2 consolidates sc_swappiness() into a single definition that works regardless of CONFIG_MEMCG, fixing the node reclaim swappiness bug. Ridong Chen (2): memcg: move mem_cgroup_swappiness to memcontrol.h mm: vmscan: fix node reclaim ignoring swappiness parameter include/linux/memcontrol.h | 25 +++++++++++++++++++++++-- include/linux/swap.h | 19 ------------------- mm/memcontrol.c | 3 +-- mm/vmscan.c | 17 +++++++---------- 4 files changed, 31 insertions(+), 33 deletions(-) -- 2.43.0