The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] mm: fix node reclaim swappiness handling
@ 2026-07-11  9:11 Ridong Chen
  2026-07-11  9:11 ` [PATCH 1/2] memcg: move mem_cgroup_swappiness to memcontrol.h Ridong Chen
  2026-07-11  9:11 ` [PATCH 2/2] mm: vmscan: fix node reclaim ignoring swappiness parameter Ridong Chen
  0 siblings, 2 replies; 3+ messages in thread
From: Ridong Chen @ 2026-07-11  9:11 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Muchun Song, Chris Li, Kairui Song,
	David Hildenbrand, Barry Song, Yuanchu Xie
  Cc: linux-mm, cgroups, linux-kernel, ridong.chen, Ridong Chen

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-11  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11  9:11 [PATCH 0/2] mm: fix node reclaim swappiness handling Ridong Chen
2026-07-11  9:11 ` [PATCH 1/2] memcg: move mem_cgroup_swappiness to memcontrol.h Ridong Chen
2026-07-11  9:11 ` [PATCH 2/2] mm: vmscan: fix node reclaim ignoring swappiness parameter Ridong Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox