[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1299503155-6210-1-git-send-email-pholasek@redhat.com>
Date: Mon, 7 Mar 2011 14:05:55 +0100
From: Petr Holasek <pholasek@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: emunson@...bm.net, anton@...hat.com,
Petr Holasek <pholasek@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Mel Gorman <mel@....ul.ie>,
Andrew Morton <akpm@...ux-foundation.org>,
Wu Fengguang <fengguang.wu@...el.com>, linux-mm@...ck.org
Subject: [PATCH] hugetlb: /proc/meminfo shows data for all sizes of hugepages
/proc/meminfo file shows data for all used sizes of hugepages
on system, not only for default hugepage size.
Signed-off-by: Petr Holasek <pholasek@...hat.com>
---
mm/hugetlb.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index bb0b7c1..7919849 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1963,18 +1963,20 @@ out:
void hugetlb_report_meminfo(struct seq_file *m)
{
- struct hstate *h = &default_hstate;
- seq_printf(m,
- "HugePages_Total: %5lu\n"
- "HugePages_Free: %5lu\n"
- "HugePages_Rsvd: %5lu\n"
- "HugePages_Surp: %5lu\n"
- "Hugepagesize: %8lu kB\n",
- h->nr_huge_pages,
- h->free_huge_pages,
- h->resv_huge_pages,
- h->surplus_huge_pages,
- 1UL << (huge_page_order(h) + PAGE_SHIFT - 10));
+ struct hstate *h;
+
+ for_each_hstate(h)
+ seq_printf(m,
+ "HugePages_Total: %5lu\n"
+ "HugePages_Free: %5lu\n"
+ "HugePages_Rsvd: %5lu\n"
+ "HugePages_Surp: %5lu\n"
+ "Hugepagesize: %8lu kB\n",
+ h->nr_huge_pages,
+ h->free_huge_pages,
+ h->resv_huge_pages,
+ h->surplus_huge_pages,
+ 1UL << (huge_page_order(h) + PAGE_SHIFT - 10));
}
int hugetlb_report_node_meminfo(int nid, char *buf)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists