Skip to content
  • zhenwei pi's avatar
    hugetop: collect huge page info from /sys · 2fbd7ea1
    zhenwei pi authored and Craig Small's avatar Craig Small committed
    
    
    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
    
    Signed-off-by: default avatarzhenwei pi <pizhenwei@bytedance.com>
    2fbd7ea1