[PATCH 0/2] mm: fix node reclaim swappiness handling

Ridong Chen posted 2 patches 2 weeks ago
There is a newer version of this series
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(-)
[PATCH 0/2] mm: fix node reclaim swappiness handling
Posted by Ridong Chen 2 weeks ago
From: Ridong Chen <chenridong@xiaomi.com>

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