Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-09-15 Thread Andrew Hastings
Long quote; please see below: Eric B Munson wrote: > Transparent huge pages (THP) give another option for access to huge pages for > anonymous mappings. This patch adds the ability to specify that the process > heap should be aligned and (if requested madvised) to be merged into huge > pages > b

[Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-09-13 Thread Eric B Munson
Transparent huge pages (THP) give another option for access to huge pages for anonymous mappings. This patch adds the ability to specify that the process heap should be aligned and (if requested madvised) to be merged into huge pages by khugepaged. For more information on THP see linux-2.6/Docume

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-07-20 Thread Andrew Hastings
Eric, On 07/11/11 10:51, Eric B Munson wrote: > diff --git a/morecore.c b/morecore.c > index 6b4364c..c2a445c 100644 > --- a/morecore.c > +++ b/morecore.c > @@ -202,6 +202,72 @@ static void *hugetlbfs_morecore(ptrdiff_t increment) > return p; > } > > +static void *thp_morecore(ptrdiff_t i

[Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-07-11 Thread Eric B Munson
Transparent huge pages (THP) give another option for access to huge pages for anonymous mappings. This patch adds the ability to specify that the process heap should be aligned and (if requested madvised) to be merged into huge pages by khugepaged. For more information on THP see linux-2.6/Docume

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-17 Thread Andrew Hastings
Eric B Munson wrote: > On Wed, 15 Jun 2011, Andrew Hastings wrote: >> My opinion: There's no reason for HUGETLB_MORECORE=thp to _not_ do the >> madvise. HUGETLB_MORECORE=thp should be implemented as a wrapper around >> sbrk; it should _not_ add a gap to the heap. > > I am fine having madvise b

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-16 Thread David Gibson
On Wed, Jun 15, 2011 at 10:29:26AM -0400, Eric B Munson wrote: > On Wed, 15 Jun 2011, Andrew Hastings wrote: > > My opinion: There's no reason for HUGETLB_MORECORE=thp to _not_ do > > the madvise. HUGETLB_MORECORE=thp should be implemented as a > > wrapper around sbrk; it should _not_ add a gap t

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-15 Thread Eric B Munson
On Wed, 15 Jun 2011, Andrew Hastings wrote: > Eric B Munson wrote: > >It is true that you will end up with huge pages for the heap eventually > >without > >changing anything. khugepaged will promote areas it finds that are 2MB > >aligned, etc. However, it is possible to have things _allocated_

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-15 Thread Andrew Hastings
Eric B Munson wrote: > It is true that you will end up with huge pages for the heap eventually > without > changing anything. khugepaged will promote areas it finds that are 2MB > aligned, etc. However, it is possible to have things _allocated_ as > transparent huge pages without requiring promo

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-15 Thread Eric B Munson
On Tue, 14 Jun 2011, David Gibson wrote: > On Mon, Jun 13, 2011 at 09:06:16AM -0500, Andrew Hastings wrote: > > On 06/08/2011 09:40 PM, Eric B Munson wrote: > > > On Wed, Jun 8, 2011 at 8:50 PM, David Gibson > > > wrote: > [snip] > > Actually, in thinking about this some more I wonder if the >

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-13 Thread David Gibson
On Mon, Jun 13, 2011 at 09:06:16AM -0500, Andrew Hastings wrote: > On 06/08/2011 09:40 PM, Eric B Munson wrote: > > On Wed, Jun 8, 2011 at 8:50 PM, David Gibson > > wrote: [snip] > Actually, in thinking about this some more I wonder if the > implementation ought to be using sbrk instead of mmap?

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-13 Thread Andrew Hastings
On 06/08/2011 09:40 PM, Eric B Munson wrote: > On Wed, Jun 8, 2011 at 8:50 PM, David Gibson > wrote: >> On Wed, Jun 08, 2011 at 11:16:42AM -0500, Andrew Hastings wrote: >>> On 06/07/11 11:08, Eric B Munson wrote: On Fri, 03 Jun 2011, Andrew Hastings wrote: >> [snip] > Might it make sense

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-08 Thread Eric B Munson
On Wed, Jun 8, 2011 at 8:50 PM, David Gibson wrote: > On Wed, Jun 08, 2011 at 11:16:42AM -0500, Andrew Hastings wrote: >> On 06/07/11 11:08, Eric B Munson wrote: >> > On Fri, 03 Jun 2011, Andrew Hastings wrote: > [snip] >> >> Might it make sense for HUGETLB_MORECORE=thp to automatically turn >> >>

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-08 Thread David Gibson
On Wed, Jun 08, 2011 at 11:16:42AM -0500, Andrew Hastings wrote: > On 06/07/11 11:08, Eric B Munson wrote: > > On Fri, 03 Jun 2011, Andrew Hastings wrote: [snip] > >> Might it make sense for HUGETLB_MORECORE=thp to automatically turn > >> on the madvise(MADV_HUGEPAGE)? If necessary, a separate env

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-08 Thread Andrew Hastings
On 06/07/11 11:08, Eric B Munson wrote: > On Fri, 03 Jun 2011, Andrew Hastings wrote: > >> Hello, Eric! >> >> On 05/26/2011 12:13 PM, Eric B Munson wrote: >>> diff --git a/HOWTO b/HOWTO >>> index 3c1f124..b018543 100644 >>> --- a/HOWTO >>> +++ b/HOWTO >>> @@ -2,7 +2,7 @@ libhugetlbfs HOWTO >>> ==

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-07 Thread Eric B Munson
On Fri, 03 Jun 2011, Andrew Hastings wrote: > Hello, Eric! > > On 05/26/2011 12:13 PM, Eric B Munson wrote: > >diff --git a/HOWTO b/HOWTO > >index 3c1f124..b018543 100644 > >--- a/HOWTO > >+++ b/HOWTO > >@@ -2,7 +2,7 @@ libhugetlbfs HOWTO > > == > > > > Author: David Gibson, Ada

Re: [Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-06-03 Thread Andrew Hastings
Hello, Eric! On 05/26/2011 12:13 PM, Eric B Munson wrote: > diff --git a/HOWTO b/HOWTO > index 3c1f124..b018543 100644 > --- a/HOWTO > +++ b/HOWTO > @@ -2,7 +2,7 @@ libhugetlbfs HOWTO > == > > Author: David Gibson, Adam Litke, and > others > -Last updated: February 1st, 2011 >

[Libhugetlbfs-devel] [PATCH 1/3] Add support for THP in morecore

2011-05-26 Thread Eric B Munson
Transparent huge pages (THP) give another option for access to huge pages for anonymous mappings. This patch adds the ability to specify that the process heap should be aligned and (if requested madvised) to be merged into huge pages by khugepaged. For more information on THP see linux-2.6/Docume