]> git.hungrycats.org Git - linux/commit
vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event
authorMengEn Sun <mengensun@tencent.com>
Fri, 1 Nov 2024 04:06:38 +0000 (12:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:33:05 +0000 (10:33 +0100)
commitf8cca70b0e5741b4014cfd11e4346b271267f784
tree6afe4ee0ffd9be9331ead9e3084904d26876cc88
parent8a92dc4df89c50bdb26667419ea70e0abbce456e
vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event

commit 2ea80b039b9af0b71c00378523b71c254fb99c23 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/1730433998-10461-1-git-send-email-mengensun@tencent.com
Fixes: f19298b9516c ("mm/vmstat: convert NUMA statistics to basic NUMA counters")
Signed-off-by: MengEn Sun <mengensun@tencent.com>
Reviewed-by: JinLiang Zheng <alexjlzheng@tencent.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/vmstat.c