Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] mm: Fix vmstat after removing NR_BOUNCE
@ 2025-05-29 10:38 Kirill A. Shutemov
  2025-05-29 10:40 ` Vlastimil Babka
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2025-05-29 10:38 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand
  Cc: lorenzo.stoakes, Liam.Howlett, vbabka, rppt, surenb, mhocko,
	linux-mm, linux-kernel, Kirill A. Shutemov, Hongyu Ning, stable,
	Christoph Hellwig, Hannes Reinecke, Johannes Thumshirn,
	Jens Axboe

Hongyu noticed that the nr_unaccepted counter kept growing even in the
absence of unaccepted memory on the machine.

This happens due to a commit that removed NR_BOUNCE: it removed the
counter from the enum zone_stat_item, but left it in the vmstat_text
array.

As a result, all counters below nr_bounce in /proc/vmstat are
shifted by one line, causing the numa_hit counter to be labeled as
nr_unaccepted.

To fix this issue, remove nr_bounce from the vmstat_text array.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Hongyu Ning <hongyu.ning@linux.intel.com>
Fixes: 194df9f66db8 ("mm: remove NR_BOUNCE zone stat")
Cc: stable@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>
---
 mm/vmstat.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 4c268ce39ff2..ae9882063d89 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1201,7 +1201,6 @@ const char * const vmstat_text[] = {
 	"nr_zone_unevictable",
 	"nr_zone_write_pending",
 	"nr_mlock",
-	"nr_bounce",
 #if IS_ENABLED(CONFIG_ZSMALLOC)
 	"nr_zspages",
 #endif
-- 
2.47.2


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

end of thread, other threads:[~2025-06-02  5:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 10:38 [PATCH] mm: Fix vmstat after removing NR_BOUNCE Kirill A. Shutemov
2025-05-29 10:40 ` Vlastimil Babka
2025-05-29 10:47   ` Kirill A. Shutemov
2025-05-29 10:51     ` Kirill A. Shutemov
2025-05-29 12:30       ` Konstantin Khlebnikov
2025-05-29 10:43 ` Jens Axboe
2025-05-29 11:59 ` kernel test robot
2025-05-29 12:09   ` Kirill A. Shutemov
2025-05-29 12:13 ` Vlastimil Babka
2025-05-29 12:22 ` Michal Hocko
2025-05-29 18:13 ` Shakeel Butt
2025-06-02  5:01 ` Christoph Hellwig

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