The patch titled Subject: memcg: make PGPGIN and PGPGOUT v1 only has been added to the -mm mm-unstable branch. Its filename is memcg-make-pgpgin-and-pgpgout-v1-only.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/memcg-make-pgpgin-and-pgpgout-v1-only.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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: Shakeel Butt <shakeel.butt@xxxxxxxxx> Subject: memcg: make PGPGIN and PGPGOUT v1 only Date: Wed, 14 Aug 2024 22:04:53 -0700 Currently PGPGIN and PGPGOUT are used and exposed in the memcg v1 only code. So, let's put them under CONFIG_MEMCG_V1. Link: https://lkml.kernel.org/r/20240815050453.1298138-8-shakeel.butt@xxxxxxxxx Signed-off-by: Shakeel Butt <shakeel.butt@xxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Muchun Song <muchun.song@xxxxxxxxx> Cc: Roman Gushchin <roman.gushchin@xxxxxxxxx> Cc: T.J. Mercier <tjmercier@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/mm/memcontrol.c~memcg-make-pgpgin-and-pgpgout-v1-only +++ a/mm/memcontrol.c @@ -414,8 +414,10 @@ unsigned long lruvec_page_state_local(st /* Subset of vm_event_item to report for memcg event stats */ static const unsigned int memcg_vm_event_stat[] = { +#ifdef CONFIG_MEMCG_V1 PGPGIN, PGPGOUT, +#endif PGSCAN_KSWAPD, PGSCAN_DIRECT, PGSCAN_KHUGEPAGED, @@ -1474,10 +1476,11 @@ static void memcg_stat_format(struct mem memcg_events(memcg, PGSTEAL_KHUGEPAGED)); for (i = 0; i < ARRAY_SIZE(memcg_vm_event_stat); i++) { +#ifdef CONFIG_MEMCG_V1 if (memcg_vm_event_stat[i] == PGPGIN || memcg_vm_event_stat[i] == PGPGOUT) continue; - +#endif seq_buf_printf(s, "%s %lu\n", vm_event_name(memcg_vm_event_stat[i]), memcg_events(memcg, memcg_vm_event_stat[i])); _ Patches currently in -mm which might be from shakeel.butt@xxxxxxxxx are memcg-increase-the-valid-index-range-for-memcg-stats.patch memcg-replace-memcg-id-idr-with-xarray.patch memcg-replace-memcg-id-idr-with-xarray-v2.patch memcg-use-ratelimited-stats-flush-in-the-reclaim.patch memcg-move-v1-only-percpu-stats-in-separate-struct.patch memcg-move-mem_cgroup_event_ratelimit-to-v1-code.patch memcg-move-mem_cgroup_charge_statistics-to-v1-code.patch memcg-move-v1-events-and-statistics-code-to-v1-file.patch memcg-make-v1-only-functions-static.patch memcg-allocate-v1-event-percpu-only-on-v1-deployment.patch memcg-make-pgpgin-and-pgpgout-v1-only.patch