linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event
@ 2024-10-30  8:37 mengensun88
  2024-10-30 23:35 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: mengensun88 @ 2024-10-30  8:37 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, alexjlzheng, MengEn Sun

From: MengEn Sun <mengensun@tencent.com>

NUMA events will only be folded from per-CPU statistics to per
zone and global statistics when the user actually needs it.

So, we perform this folding when reading the /proc/zoneinfo

Fixes: f19298b9516c ("mm/vmstat: convert NUMA statistics to basic NUMA counters")
Reviewed-by: JinLiang Zheng <alexjlzheng@tencent.com>
Signed-off-by: MengEn Sun <mengensun@tencent.com>
---
 mm/vmstat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index b5a4cea..2770800 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1778,6 +1778,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
 			   zone_page_state(zone, i));
 
 #ifdef CONFIG_NUMA
+	fold_vm_zone_numa_events(zone);
 	for (i = 0; i < NR_VM_NUMA_EVENT_ITEMS; i++)
 		seq_printf(m, "\n      %-12s %lu", numa_stat_name(i),
 			   zone_numa_event_state(zone, i));
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event
  2024-10-30  8:37 [PATCH] vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event mengensun88
@ 2024-10-30 23:35 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2024-10-30 23:35 UTC (permalink / raw)
  To: mengensun88; +Cc: linux-mm, linux-kernel, alexjlzheng, MengEn Sun

On Wed, 30 Oct 2024 16:37:37 +0800 mengensun88@gmail.com wrote:

> From: MengEn Sun <mengensun@tencent.com>
> 
> NUMA events will only be folded from per-CPU statistics to per
> zone and global statistics when the user actually needs it.
> 
> So, we perform this folding when reading the /proc/zoneinfo

When proposing a fix, please always fully describe the
userspace-visible effects of that fix.

> Fixes: f19298b9516c ("mm/vmstat: convert NUMA statistics to basic NUMA counters")

Since v5.14.

The information which I requested will help others decide whether
earlier kernel versions should apply this fix.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-30 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-30  8:37 [PATCH] vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event mengensun88
2024-10-30 23:35 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox