* + mm-mglru-update-mg-lru-proactive-reclaim-statistics-only-to-memcg.patch added to mm-new branch
@ 2025-07-17 23:05 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-07-17 23:05 UTC (permalink / raw)
To: mm-commits, zhengqi.arch, yuzhao, yuanchu, songmuchun,
shakeel.butt, roman.gushchin, mhocko, lorenzo.stoakes, kinseyho,
hannes, gthelen, david, axelrasmussen, jiahao1, akpm
The patch titled
Subject: mm/mglru: update MG-LRU proactive reclaim statistics only to memcg
has been added to the -mm mm-new branch. Its filename is
mm-mglru-update-mg-lru-proactive-reclaim-statistics-only-to-memcg.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mglru-update-mg-lru-proactive-reclaim-statistics-only-to-memcg.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Hao Jia <jiahao1@lixiang.com>
Subject: mm/mglru: update MG-LRU proactive reclaim statistics only to memcg
Date: Thu, 17 Jul 2025 16:28:45 +0800
Users can use /sys/kernel/debug/lru_gen to trigger proactive memory
reclaim of a specified memcg. Currently, statistics such as pgrefill,
pgscan and pgsteal will be updated to the /proc/vmstat system memory
statistics.
This will confuse some system memory pressure monitoring tools, making it
difficult to determine whether pgscan and pgsteal are caused by
system-level pressure or by proactive memory reclaim of some specific
memory cgroup.
Therefore, make this interface behave similarly to memory.reclaim. Update
proactive memory reclaim statistics only to its memory cgroup.
Link: https://lkml.kernel.org/r/20250717082845.34673-1-jiahao.kernel@gmail.com
Signed-off-by: Hao Jia <jiahao1@lixiang.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kinsey Ho <kinseyho@google.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Yuanchu Xie <yuanchu@google.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmscan.c | 2 ++
1 file changed, 2 insertions(+)
--- a/mm/vmscan.c~mm-mglru-update-mg-lru-proactive-reclaim-statistics-only-to-memcg
+++ a/mm/vmscan.c
@@ -5561,6 +5561,7 @@ static int run_cmd(char cmd, int memcg_i
if (memcg_id != mem_cgroup_id(memcg))
goto done;
+ sc->target_mem_cgroup = memcg;
lruvec = get_lruvec(memcg, nid);
if (swappiness < MIN_SWAPPINESS)
@@ -5597,6 +5598,7 @@ static ssize_t lru_gen_seq_write(struct
.may_swap = true,
.reclaim_idx = MAX_NR_ZONES - 1,
.gfp_mask = GFP_KERNEL,
+ .proactive = true,
};
buf = kvmalloc(len + 1, GFP_KERNEL);
_
Patches currently in -mm which might be from jiahao1@lixiang.com are
mm-mglru-stop-try_to_inc_min_seq-if-min_seq-has-not-increased.patch
mm-mglru-update-mg-lru-proactive-reclaim-statistics-only-to-memcg.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-17 23:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 23:05 + mm-mglru-update-mg-lru-proactive-reclaim-statistics-only-to-memcg.patch added to mm-new branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.