Skip to content

hugetop: collect huge page info from /sys

zhenwei pi requested to merge pizhenwei/procps:hugetop-numa into master

There are different size of huge pages in a Linux kernel, for example, modern x86 supports both 2M and 1G huge page size. According to the latest source code, Linux support as max as 4 hstate:

struct hstate hstates[HUGE_MAX_HSTATE];

The default huge page size could be specified by kernel boot argument default_hugepagesz. Hugepagesize from /proc/meminfo shows the default hstate only. Then we hit this issue: once both 1G and 2M huge pages are in use together, /proc/meminfo only reports either one. Then part of huge pages are missing from hugetop, the huge pages number of processes may be wrong.

References: #317 (closed)

Signed-off-by: zhenwei pi pizhenwei@bytedance.com

Merge request reports