From: "Nish Aravamudan" <nish.aravamudan@gmail.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: David Miller <davem@davemloft.net>,
paulus@samba.org, clameter@sgi.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
torvalds@linux-foundation.org, agl@us.ibm.com,
Mel Gorman <mel@csn.ul.ie>
Subject: Re: larger default page sizes...
Date: Wed, 26 Mar 2008 08:54:49 -0700 [thread overview]
Message-ID: <29495f1d0803260854j46d37eedrc0927af226b3b8c8@mail.gmail.com> (raw)
In-Reply-To: <1FE6DD409037234FAB833C420AA843ECE9E2CA@orsmsx424.amr.corp.intel.com>
On 3/25/08, Luck, Tony <tony.luck@intel.com> wrote:
> > > How do I get gcc to use hugepages, for instance?
> >
> > Implementing transparent automatic usage of hugepages has been
> > discussed many times, it's definitely doable and other OSs have
> > implemented this for years.
> >
> > This is what I was implying.
>
>
> "large" pages, or "super" pages perhaps ... but Linux "huge" pages
> seem pretty hard to adapt for generic use by applications. They
> are generally a somewhere between a bit too big (2MB on X86) to
> way too big (64MB, 256MB, 1GB or 4GB on ia64) for general use.
>
> Right now they also suffer from making the sysadmin pick at
> boot time how much memory to allocate as huge pages (while it
> is possible to break huge pages into normal pages, going in
> the reverse direction requires a memory defragmenter that
> doesn't exist).
That's not entirely true. We have a dynamic pool now, thanks to Adam
Litke [added to Cc], which can be treated as a high watermark for the
hugetlb pool (and the static pool value serves as a low watermark).
Unless by hugepages you mean something other than what I think (but
referring to a 2M size on x86 imples you are not). And with the
antifragmentation improvements, hugepage pool changes at run-time are
more likely to succeed [added Mel to Cc].
> Making an application use huge pages as heap may be simple
> (just link with a different library to provide with a different
> version of malloc()) ... code, stack, mmap'd files are all
> a lot harder to do transparently.
I feel like I should promote libhugetlbfs here. We're trying to make
things easier for applications to use. You can back the heap by
hugepages via LD_PRELOAD. But even that isn't always simple (what
happens when something is already allocated on the heap?, which we've
seen happen even in our constructor in the library, for instance).
We're working on hugepage stack support. Text/BSS/Data segment
remapping exists now, too, but does require relinking to be more
successful. We have a mode that allows libhugetlbfs to try to fit the
segments into hugepages, or even just those parts that might fit --
but we have limitations on power and IA64, for instance, where
hugepages are restricted in their placement (either depending on the
process' existing mappings or generally). libhugetlbfs has, at least,
been tested a bit on IA64 to validate the heap backing (IIRC) and the
various kernel tests. We also have basic sparc support -- however, I
don't have any boxes handy to test on (working on getting them added
to our testing grid and then will revisit them), and then one box I
used before gave me semi-spurious soft-lockups (old bug, unclear if it
is software or just buggy hardware).
In any case, my point is people are trying to work on this from
various angles. Both making hugepages more available at run-time (in a
dynamic fashion, based upon need) and making them easier to use for
applications. Is it easy? Not necessarily. Is it guaranteed to work? I
like to think we make a best effort. But as others have pointed out,
it doesn't seem like we're going to get mainline transparent hugepage
support anytime soon.
Thanks,
Nish
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-03-26 15:54 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-21 6:17 [00/14] Virtual Compound Page Support V3 Christoph Lameter
2008-03-21 6:17 ` [01/14] vcompound: Return page array on vunmap Christoph Lameter
2008-03-21 6:17 ` [02/14] vcompound: pageflags: Add PageVcompound() Christoph Lameter
2008-03-21 6:17 ` [03/14] vmallocinfo: Support display of vcompound for a virtual compound page Christoph Lameter
2008-03-21 7:55 ` Eric Dumazet
2008-03-21 17:32 ` Christoph Lameter
2008-03-21 6:17 ` [04/14] vcompound: Core piece Christoph Lameter
2008-03-22 12:10 ` KOSAKI Motohiro
2008-03-24 18:28 ` Christoph Lameter
2008-03-21 6:17 ` [05/14] vcompound: Debugging aid Christoph Lameter
2008-03-21 6:17 ` [06/14] vcompound: Virtual fallback for sparsemem Christoph Lameter
2008-03-21 6:17 ` [07/14] vcompound: bit waitqueue support Christoph Lameter
2008-03-21 6:17 ` [08/14] vcompound: Fallback for zone wait table Christoph Lameter
2008-03-21 6:17 ` [09/14] vcompound: crypto: Fallback for temporary order 2 allocation Christoph Lameter
2008-03-21 6:17 ` [10/14] vcompound: slub: Use for buffer to correlate allocation addresses Christoph Lameter
2008-03-21 6:17 ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Christoph Lameter
2008-03-21 7:25 ` David Miller, Christoph Lameter
2008-03-21 8:39 ` Ingo Molnar
2008-03-21 17:33 ` Christoph Lameter
2008-03-21 19:02 ` Ingo Molnar
2008-03-21 19:04 ` Christoph Lameter
2008-03-21 17:40 ` Christoph Lameter
2008-03-21 21:57 ` David Miller, Christoph Lameter
2008-03-24 18:27 ` Christoph Lameter
2008-03-24 20:37 ` larger default page sizes David Miller, Christoph Lameter
2008-03-24 21:05 ` Christoph Lameter
2008-03-24 21:43 ` David Miller, Christoph Lameter
2008-03-25 17:48 ` Christoph Lameter
2008-03-25 23:22 ` David Miller, Christoph Lameter
2008-03-25 23:41 ` Peter Chubb
2008-03-25 23:49 ` David Miller, Peter Chubb
2008-03-26 0:25 ` Peter Chubb
2008-03-26 0:31 ` David Miller, Peter Chubb
2008-03-26 0:34 ` David Mosberger-Tang
2008-03-26 0:39 ` David Miller, David Mosberger-Tang
2008-03-26 0:57 ` Peter Chubb
2008-03-26 4:16 ` John Marvin
2008-03-26 4:36 ` David Miller, John Marvin
2008-03-24 21:25 ` Luck, Tony
2008-03-24 21:46 ` David Miller, Luck, Tony
2008-03-25 3:29 ` Paul Mackerras
2008-03-25 4:15 ` David Miller, Paul Mackerras
2008-03-25 11:50 ` Paul Mackerras
2008-03-25 23:32 ` David Miller, Paul Mackerras
2008-03-25 23:49 ` Luck, Tony
2008-03-26 0:16 ` David Miller, Luck, Tony
2008-03-26 15:54 ` Nish Aravamudan [this message]
2008-03-26 17:05 ` Luck, Tony
2008-03-26 18:54 ` Mel Gorman
2008-03-25 12:05 ` Andi Kleen
2008-03-25 21:27 ` Paul Mackerras
2008-03-26 5:24 ` Paul Mackerras
2008-03-26 15:59 ` Linus Torvalds
2008-03-27 1:08 ` Paul Mackerras
2008-03-26 17:56 ` Christoph Lameter
2008-03-26 23:21 ` David Miller, Christoph Lameter
2008-03-27 3:00 ` Paul Mackerras
2008-03-25 18:27 ` Dave Hansen
2008-03-24 21:13 ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Luck, Tony
2008-03-25 17:42 ` Christoph Lameter
2008-03-25 19:09 ` Luck, Tony
2008-03-25 19:25 ` Christoph Lameter
2008-03-21 22:30 ` Andi Kleen
2008-03-24 19:53 ` Christoph Lameter
2008-03-25 7:51 ` Andi Kleen
2008-03-25 17:55 ` Christoph Lameter
2008-03-25 18:07 ` Andi Kleen
2008-03-21 6:17 ` [12/14] vcompound: Avoid vmalloc in e1000 driver Christoph Lameter
2008-03-21 17:27 ` Kok, Auke
2008-03-21 6:17 ` [13/14] vcompound: Use vcompound for swap_map Christoph Lameter
2008-03-21 21:25 ` Andi Kleen
2008-03-21 21:33 ` Christoph Lameter
2008-03-24 19:54 ` Christoph Lameter
2008-03-25 7:52 ` Andi Kleen
2008-03-25 17:45 ` Christoph Lameter
2008-03-25 17:55 ` Andi Kleen
2008-03-25 17:51 ` Christoph Lameter
2008-03-21 6:17 ` [14/14] vcompound: Avoid vmalloc for ehash_locks Christoph Lameter
2008-03-21 7:02 ` Eric Dumazet
2008-03-21 7:03 ` Christoph Lameter
2008-03-21 7:31 ` David Miller, Christoph Lameter
2008-03-21 7:42 ` Eric Dumazet
2008-03-21 7:31 ` David Miller, Eric Dumazet
2008-03-21 17:31 ` Christoph Lameter
2008-03-22 18:40 ` [00/14] Virtual Compound Page Support V3 Arjan van de Ven
2008-03-24 18:31 ` Christoph Lameter
2008-03-24 19:29 ` Christoph Lameter
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=29495f1d0803260854j46d37eedrc0927af226b3b8c8@mail.gmail.com \
--to=nish.aravamudan@gmail.com \
--cc=agl@us.ibm.com \
--cc=clameter@sgi.com \
--cc=davem@davemloft.net \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=paulus@samba.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox