Skip to content

Commit

Permalink
hugetlb: indicate surplus huge page counts in per-node meminfo
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Nishanth Aravamudan authored and torvalds committed Mar 26, 2008
1 parent 6edef97 commit a1de091
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit a1de091

Please sign in to comment.