Skip to content

Commit f6275d3

Browse files
MengEn SunSasha Levin
authored andcommitted
vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event
commit 2ea80b0 upstream. Since 5.14-rc1, NUMA events will only be folded from per-CPU statistics to per zone and global statistics when the user actually needs it. Currently, the kernel has performs the fold operation when reading /proc/vmstat, but does not perform the fold operation in /proc/zoneinfo. This can lead to inaccuracies in the following statistics in zoneinfo: - numa_hit - numa_miss - numa_foreign - numa_interleave - numa_local - numa_other Therefore, before printing per-zone vm_numa_event when reading /proc/zoneinfo, we should also perform the fold operation. Link: https://lkml.kernel.org/r/[email protected] Fixes: f19298b ("mm/vmstat: convert NUMA statistics to basic NUMA counters") Signed-off-by: MengEn Sun <[email protected]> Reviewed-by: JinLiang Zheng <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a6a1132 commit f6275d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/vmstat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
17111711
zone_page_state(zone, i));
17121712

17131713
#ifdef CONFIG_NUMA
1714+
fold_vm_zone_numa_events(zone);
17141715
for (i = 0; i < NR_VM_NUMA_EVENT_ITEMS; i++)
17151716
seq_printf(m, "\n %-12s %lu", numa_stat_name(i),
17161717
zone_numa_event_state(zone, i));

0 commit comments

Comments
 (0)