]> err.no Git - linux-2.6/commitdiff
hugetlb: indicate surplus huge page counts in per-node meminfo
authorNishanth Aravamudan <nacc@us.ibm.com>
Wed, 26 Mar 2008 21:37:53 +0000 (14:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Mar 2008 22:01:33 +0000 (15:01 -0700)
Currently we show the surplus hugetlb pool state in /proc/meminfo, but
not in the per-node meminfo files, even though we track the information
on a per-node basis. Printing it there can help track down dynamic pool
bugs including the one in the follow-on patch.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c

index 74c1b6b0b37b82dce75e06533c989ab73001afeb..40d841cb51260f8b8b69193fac3d50d1a4d13deb 100644 (file)
@@ -671,9 +671,11 @@ int hugetlb_report_node_meminfo(int nid, char *buf)
 {
        return sprintf(buf,
                "Node %d HugePages_Total: %5u\n"
-               "Node %d HugePages_Free:  %5u\n",
+               "Node %d HugePages_Free:  %5u\n"
+               "Node %d HugePages_Surp:  %5u\n",
                nid, nr_huge_pages_node[nid],
-               nid, free_huge_pages_node[nid]);
+               nid, free_huge_pages_node[nid],
+               nid, surplus_huge_pages_node[nid]);
 }
 
 /* Return the number pages of memory we physically have, in PAGE_SIZE units. */