From: Michal Hocko <mhocko@suse.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Hongyu Ning <hongyu.ning@linux.intel.com>,
stable@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.de>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] mm: Fix vmstat after removing NR_BOUNCE
Date: Thu, 29 May 2025 14:22:09 +0200 [thread overview]
Message-ID: <aDhRcXcqctogIITw@tiehlicka> (raw)
In-Reply-To: <20250529103832.2937460-1-kirill.shutemov@linux.intel.com>
On Thu 29-05-25 13:38:32, Kirill A. Shutemov wrote:
> 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>
Acked-by: Michal Hocko <mhocko@suse.com>
Unfortunatelly a common mistake to make. I have seen you have a followup
fix with a stricter build time check. Will have a look.
Thanks!
> ---
> 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
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2025-05-29 12:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250529103832.2937460-1-kirill.shutemov@linux.intel.com>
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 [this message]
2025-05-29 18:13 ` Shakeel Butt
2025-06-02 5:01 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aDhRcXcqctogIITw@tiehlicka \
--to=mhocko@suse.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=david@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=hongyu.ning@linux.intel.com \
--cc=johannes.thumshirn@wdc.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=rppt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox