summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2008-03-26 14:37:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-26 15:01:33 -0700
commita1de09195b294c6a4c5dec8c8defd0a2688d3f75 (patch)
tree097720233a20f50a094ce38d8e4853bb4e4a562d /mm
parent6edef97e17ca1c322b146023862da8a39e36204d (diff)
downloadblackbird-op-linux-a1de09195b294c6a4c5dec8c8defd0a2688d3f75.tar.gz
blackbird-op-linux-a1de09195b294c6a4c5dec8c8defd0a2688d3f75.zip
hugetlb: indicate surplus huge page counts in per-node meminfo
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>
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 74c1b6b0b37b..40d841cb5126 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -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. */
OpenPOWER on IntegriCloud