mm/memcontrol: add per-memcg pgpgin/pswpin counter
authorJingxiang Zeng <linuszeng@tencent.com>
Fri, 30 Aug 2024 08:22:44 +0000 (16:22 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Nov 2024 00:56:21 +0000 (16:56 -0800)
commit15ff4d409e1a6f939d94d2005ae275c26b2b0d9d
treec53b63f2652fd4d70dabb3efd5fa66ff15f75bce
parentba7196e566516f798635e26e976ae44f708d9d54
mm/memcontrol: add per-memcg pgpgin/pswpin counter

In proactive memory reclamation scenarios, it is necessary to estimate the
pswpin and pswpout metrics of the cgroup to determine whether to continue
reclaiming anonymous pages in the current batch.  This patch will collect
these metrics and expose them.

[linuszeng@tencent.com: v2]
Link: https://lkml.kernel.org/r/20240830082244.156923-1-jingxiangzeng.cas@gmail.com
Li  nk: https://lkml.kernel.org/r/20240913084453.3605621-1-jingxiangzeng.cas@gmail.com
Link: https://lkml.kernel.org/r/20240830082244.156923-1-jingxiangzeng.cas@gmail.com
Signed-off-by: Jingxiang Zeng <linuszeng@tencent.com>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c
mm/page_io.c