The patch from Rohit and David M-T changes the hugetlb page info in
/proc/meminfo slightly.
It makes the identifiers a little clearer while ensuring that we don't
add any identifiers which have whitespace. glibc is/shall be parsing
this information to determine the size and alignment requirements of
the hugetlb pages.
This basically means that procfs is a requirement for successful
hugetlb page usage. Not very nice, but I suspect real-world userspace
fails without procfs anyway.
{
extern unsigned long htlbpagemem, htlbzone_pages;
len += sprintf(page + len,
- "HugePages: %8lu\n"
- "Available: %8lu\n"
- "Size: %8lu kB\n",
+ "HugePages_Total: %5lu\n"
+ "HugePages_Free: %5lu\n"
+ "Hugepagesize: %5lu kB\n",
htlbzone_pages,
htlbpagemem,
HPAGE_SIZE/1024);