Commit 75a08275 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] /proc/meminfo alterations for hugetlbpages

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.
parent 682134c5
......@@ -202,9 +202,9 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
{
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment