]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: add pcp high_min high_max to proc zoneinfo
authorMengEn Sun <mengensun@tencent.com>
Thu, 10 Oct 2024 12:09:36 +0000 (20:09 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:05 +0000 (21:29 -0700)
When we do not set percpu_pagelist_high_fraction the kernel will compute
the pcp high_min/max by itself, which makes it hard to determine the
current high_min/max values.

So output the pcp high_min/max values to /proc/zoneinfo.

Link: https://lkml.kernel.org/r/20241010120935.656619-1-mengensun@tencent.com
Signed-off-by: MengEn Sun <mengensun@tencent.com>
Reviewed-by: Jinliang Zheng <alexjlzheng@tencent.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmstat.c

index b5a4cea423e1753c2f01cd9a54fd142e8db1cf56..1917c034c045b8adf7e552237b8b3b3dec7239f5 100644 (file)
@@ -1791,13 +1791,17 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
                pcp = per_cpu_ptr(zone->per_cpu_pageset, i);
                seq_printf(m,
                           "\n    cpu: %i"
-                          "\n              count: %i"
-                          "\n              high:  %i"
-                          "\n              batch: %i",
+                          "\n              count:    %i"
+                          "\n              high:     %i"
+                          "\n              batch:    %i"
+                          "\n              high_min: %i"
+                          "\n              high_max: %i",
                           i,
                           pcp->count,
                           pcp->high,
-                          pcp->batch);
+                          pcp->batch,
+                          pcp->high_min,
+                          pcp->high_max);
 #ifdef CONFIG_SMP
                pzstats = per_cpu_ptr(zone->per_cpu_zonestats, i);
                seq_printf(m, "\n  vm stats threshold: %d",