]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] /proc/meminfo alterations for hugetlbpages
authorAndrew Morton <akpm@digeo.com>
Sun, 13 Oct 2002 02:32:40 +0000 (19:32 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 13 Oct 2002 02:32:40 +0000 (19:32 -0700)
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.

fs/proc/proc_misc.c

index 32f9e7e9dce3b3ac2fdf119ea11af75de58ce012..7bdea5bbe922d94801c57da6c465d4011ec24301 100644 (file)
@@ -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);