From: Eric B Munson <emunson@mgebm.net>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Petr Holasek <pholasek@redhat.com>,
linux-kernel@vger.kernel.org, anton@redhat.com,
Andi Kleen <ak@linux.intel.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Mel Gorman <mel@csn.ul.ie>,
Andrew Morton <akpm@linux-foundation.org>,
Wu Fengguang <fengguang.wu@intel.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] hugetlb: /proc/meminfo shows data for all sizes of hugepages
Date: Mon, 7 Mar 2011 15:13:14 -0500 [thread overview]
Message-ID: <20110307201314.GA5354@mgebm.net> (raw)
In-Reply-To: <1299527214.8493.13263.camel@nimitz>
[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]
On Mon, 07 Mar 2011, Dave Hansen wrote:
> On Mon, 2011-03-07 at 14:05 +0100, Petr Holasek wrote:
> > + 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));
> > }
>
> It sounds like now we'll get a meminfo that looks like:
>
> ...
> AnonHugePages: 491520 kB
> HugePages_Total: 5
> HugePages_Free: 2
> HugePages_Rsvd: 3
> HugePages_Surp: 1
> Hugepagesize: 2048 kB
> HugePages_Total: 2
> HugePages_Free: 1
> HugePages_Rsvd: 1
> HugePages_Surp: 1
> Hugepagesize: 1048576 kB
> DirectMap4k: 12160 kB
> DirectMap2M: 2082816 kB
> DirectMap1G: 2097152 kB
>
> At best, that's a bit confusing. There aren't any other entries in
> meminfo that occur more than once. Plus, this information is available
> in the sysfs interface. Why isn't that sufficient?
>
> Could we do something where we keep the default hpage_size looking like
> it does now, but append the size explicitly for the new entries?
>
> HugePages_Total(1G): 2
> HugePages_Free(1G): 1
> HugePages_Rsvd(1G): 1
> HugePages_Surp(1G): 1
>
> -- Dave
I second that, this will help minimize the change to userspace tools that currently read
meminfo for huge page information.
Eric
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-03-07 20:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 13:05 [PATCH] hugetlb: /proc/meminfo shows data for all sizes of hugepages Petr Holasek
2011-03-07 13:05 ` Petr Holasek
2011-03-07 19:46 ` Dave Hansen
2011-03-07 19:46 ` Dave Hansen
2011-03-07 20:13 ` Eric B Munson [this message]
2011-03-07 22:51 ` Andrew Morton
2011-03-07 22:51 ` Andrew Morton
2011-03-07 23:14 ` Naoya Horiguchi
2011-03-07 23:14 ` Naoya Horiguchi
2011-03-07 23:24 ` Eric B Munson
2011-03-07 23:24 ` Eric B Munson
2011-03-07 23:25 ` Andrew Morton
2011-03-07 23:25 ` Andrew Morton
2011-03-07 23:47 ` David Rientjes
2011-03-07 23:47 ` David Rientjes
2011-03-08 0:57 ` Nishanth Aravamudan
2011-03-08 0:57 ` Nishanth Aravamudan
2011-03-08 9:37 ` Mel Gorman
2011-03-08 9:37 ` Mel Gorman
2011-03-08 11:21 ` Petr Holasek
2011-03-08 11:21 ` Petr Holasek
2011-03-08 13:51 ` Eric B Munson
2011-03-08 1:26 ` Andi Kleen
2011-03-08 1:26 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110307201314.GA5354@mgebm.net \
--to=emunson@mgebm.net \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=anton@redhat.com \
--cc=dave@linux.vnet.ibm.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=pholasek@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.