linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Garg, Shivank" <shivankg@amd.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, vbabka@suse.cz,
	hillf.zj@alibaba-inc.com, mgorman@techsingularity.net,
	hannes@cmpxchg.org
Subject: Re: [PATCH] mm/vmstat: Fix placement of per-node stats in /proc/zoneinfo
Date: Fri, 26 Jul 2024 09:46:26 +0530	[thread overview]
Message-ID: <32f8680b-ca66-4126-84ac-d8e375ce2f18@amd.com> (raw)
In-Reply-To: <20240725124710.76206c2c9baa27b8463b825d@linux-foundation.org>



On 7/26/2024 1:17 AM, Andrew Morton wrote:
> On Thu, 25 Jul 2024 16:26:26 +0530 Shivank Garg <shivankg@amd.com> wrote:
> 
>> The per-node stats in /proc/zoneinfo output are incorrectly inserted
>> between the first populated zone title and its specific stats. This
>> creates confusion while reading or parsing its output.
> 
> I pity anyone who has to write a parser for that mess.

Some userspace parser have faced an issue like this:
https://github.com/prometheus/procfs/issues/386
In the fix commit, they are ignoring per-node stats section.

> 
>> This patch relocates the per-node stats at the beginning for each node,
>> followed by the individual zone statistics. This fix results in a clearer
>> and more consistent output format.
> 
>> Fixes: e2ecc8a79ed4 ("mm, vmstat: print node-based stats in zoneinfo file")
> 
> It's been this way since 2016?  Surely there's a risk of breaking
> existing userspace parsers?

For some of the per-node stats, some application may probe the
/sys/devices/system/node/node*/meminfo (in KB)

There may be a possibility of breaking scripts, but it will make the
output more consistent for future scripts.

Thanks,
Shivank




  reply	other threads:[~2024-07-26  4:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25 10:56 Shivank Garg
2024-07-25 19:47 ` Andrew Morton
2024-07-26  4:16   ` Garg, Shivank [this message]
2024-08-02  5:18     ` Shivank Garg

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=32f8680b-ca66-4126-84ac-d8e375ce2f18@amd.com \
    --to=shivankg@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --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