lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c25f36c1-8703-40d9-818c-a5a5f7472c63@amd.com>
Date: Fri, 2 Aug 2024 10:48:38 +0530
From: Shivank Garg <shivankg@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, vbabka@...e.cz,
 hillf.zj@...baba-inc.com, mgorman@...hsingularity.net, hannes@...xchg.org
Subject: Re: [PATCH] mm/vmstat: Fix placement of per-node stats in
 /proc/zoneinfo



On 7/26/2024 9:46 AM, Garg, Shivank wrote:
> 
> 
> On 7/26/2024 1:17 AM, Andrew Morton wrote:
>> On Thu, 25 Jul 2024 16:26:26 +0530 Shivank Garg <shivankg@....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)



As per this commit,

https://github.com/torvalds/linux/commit/e2ecc8a79ed49f7838b4fdf352c4c48cec9424ac 
"There are a number of stats that were previously accessible via zoneinfo
that are now invisible.  While it is possible to create a new file for
the node stats, this may be missed by users.  Instead this patch prints
the stats under the first populated zone in /proc/zoneinfo."

per node stats were added to zoneinfo since some stats were missing.


However I find that all stats are in fact present in 
/sys/devices/system/node/node*/vmstat
hence I wonder why should we continue to have per-node stats in zoneinfo.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ