public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hugetlb:  restore interleaving of bootmem huge pages
@ 2009-07-17 19:49 Lee Schermerhorn
  2009-07-17 22:14 ` Andi Kleen
  2009-09-03 20:33 ` [stable] " Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Lee Schermerhorn @ 2009-07-17 19:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, stable, Andi Kleen, Mel Gorman, David Rientjes,
	Adam Litke, Andy Whitcroft, Eric Whitney

PATCH fix distribution of bootmem huge pages

Against: 2.6.31-rc3

For stable, applicable back through 2.6.27

[A version of this patch has been added to the -mm tree.  That patch
won't apply cleanly to mainline nor stable trees because of function
renaming.  This one should.]

I noticed that alloc_bootmem_huge_page() will only advance to the
next node on failure to allocate a huge page.  I asked about this
on linux-mm and linux-numa, cc'ing the usual huge page suspects.
Mel Gorman responded:

	I strongly suspect that the same node being used until allocation
	failure instead of round-robin is an oversight and not deliberate
	at all. It appears to be a side-effect of a fix made way back in
	commit 63b4613c3f0d4b724ba259dc6c201bb68b884e1a ["hugetlb: fix
	hugepage allocation with memoryless nodes"]. Prior to that patch
	it looked like allocations would always round-robin even when
	allocation was successful.

Andy Whitcroft countered that the existing behavior looked like Andi
Kleen's original implementation and suggested that we ask him.  We
did and Andy replied that his intention was to interleave the
allocations.  So, ...

This patch moves the advance of the hstate next node from which to
allocate up before the test for success of the attempted allocation.
This will unconditionally advance the next node from which to alloc,
interleaving successful allocations over the nodes with sufficient
contiguous memory, and skipping over nodes that fail the huge page
allocation attempt.

Note that alloc_bootmem_huge_page() will only be called for huge pages
of order > MAX_ORDER.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>

 mm/hugetlb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.31-rc3-mmotm-090715-2057/mm/hugetlb.c
===================================================================
--- linux-2.6.31-rc3-mmotm-090715-2057.orig/mm/hugetlb.c	2009-07-17 11:30:20.000000000 -0400
+++ linux-2.6.31-rc3-mmotm-090715-2057/mm/hugetlb.c	2009-07-17 11:37:30.000000000 -0400
@@ -1010,6 +1010,7 @@ int __weak alloc_bootmem_huge_page(struc
 				NODE_DATA(h->hugetlb_next_nid),
 				huge_page_size(h), huge_page_size(h), 0);
 
+		hstate_next_node(h);
 		if (addr) {
 			/*
 			 * Use the beginning of the huge page to store the
@@ -1019,7 +1020,6 @@ int __weak alloc_bootmem_huge_page(struc
 			m = addr;
 			goto found;
 		}
-		hstate_next_node(h);
 		nr_nodes--;
 	}
 	return 0;



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] hugetlb:  restore interleaving of bootmem huge pages
  2009-07-17 19:49 [PATCH] hugetlb: restore interleaving of bootmem huge pages Lee Schermerhorn
@ 2009-07-17 22:14 ` Andi Kleen
  2009-09-03 20:33 ` [stable] " Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2009-07-17 22:14 UTC (permalink / raw)
  To: Lee Schermerhorn
  Cc: Andrew Morton, linux-kernel, stable, Andi Kleen, Mel Gorman,
	David Rientjes, Adam Litke, Andy Whitcroft, Eric Whitney

> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>

Reviewed-by: Andi Kleen <ak@linux.intel.com>

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] [PATCH] hugetlb: restore interleaving of bootmem huge pages
  2009-07-17 19:49 [PATCH] hugetlb: restore interleaving of bootmem huge pages Lee Schermerhorn
  2009-07-17 22:14 ` Andi Kleen
@ 2009-09-03 20:33 ` Greg KH
  2009-09-08 10:32   ` Mel Gorman
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2009-09-03 20:33 UTC (permalink / raw)
  To: Lee Schermerhorn
  Cc: Andrew Morton, Eric Whitney, Mel Gorman, Adam Litke, linux-kernel,
	Andi Kleen, David Rientjes, Andy Whitcroft, stable

On Fri, Jul 17, 2009 at 03:49:14PM -0400, Lee Schermerhorn wrote:
> PATCH fix distribution of bootmem huge pages
> 
> Against: 2.6.31-rc3
> 
> For stable, applicable back through 2.6.27
> 
> [A version of this patch has been added to the -mm tree.  That patch
> won't apply cleanly to mainline nor stable trees because of function
> renaming.  This one should.]

What is the git commit id of this patch that is in Linus's tree?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] [PATCH] hugetlb: restore interleaving of bootmem huge pages
  2009-09-03 20:33 ` [stable] " Greg KH
@ 2009-09-08 10:32   ` Mel Gorman
  2009-09-08 14:13     ` Lee Schermerhorn
  0 siblings, 1 reply; 6+ messages in thread
From: Mel Gorman @ 2009-09-08 10:32 UTC (permalink / raw)
  To: Greg KH
  Cc: Lee Schermerhorn, Andrew Morton, Eric Whitney, Adam Litke,
	linux-kernel, Andi Kleen, David Rientjes, Andy Whitcroft, stable

On Thu, Sep 03, 2009 at 01:33:39PM -0700, Greg KH wrote:
> On Fri, Jul 17, 2009 at 03:49:14PM -0400, Lee Schermerhorn wrote:
> > PATCH fix distribution of bootmem huge pages
> > 
> > Against: 2.6.31-rc3
> > 
> > For stable, applicable back through 2.6.27
> > 
> > [A version of this patch has been added to the -mm tree.  That patch
> > won't apply cleanly to mainline nor stable trees because of function
> > renaming.  This one should.]
> 
> What is the git commit id of this patch that is in Linus's tree?
> 

I can only find it in mmotm. It doesn't appear to have been merged to
mainline at all. Lee, what happened with this? Did it get held off until
post-2.6.31 for merging to mainline?

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] [PATCH] hugetlb: restore interleaving of bootmem huge pages
  2009-09-08 10:32   ` Mel Gorman
@ 2009-09-08 14:13     ` Lee Schermerhorn
  2009-09-09 21:56       ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Schermerhorn @ 2009-09-08 14:13 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Greg KH, Andrew Morton, Eric Whitney, Adam Litke, linux-kernel,
	Andi Kleen, David Rientjes, Andy Whitcroft, stable

On Tue, 2009-09-08 at 11:32 +0100, Mel Gorman wrote:
> On Thu, Sep 03, 2009 at 01:33:39PM -0700, Greg KH wrote:
> > On Fri, Jul 17, 2009 at 03:49:14PM -0400, Lee Schermerhorn wrote:
> > > PATCH fix distribution of bootmem huge pages
> > > 
> > > Against: 2.6.31-rc3
> > > 
> > > For stable, applicable back through 2.6.27
> > > 
> > > [A version of this patch has been added to the -mm tree.  That patch
> > > won't apply cleanly to mainline nor stable trees because of function
> > > renaming.  This one should.]
> > 
> > What is the git commit id of this patch that is in Linus's tree?
> > 
> 
> I can only find it in mmotm. It doesn't appear to have been merged to
> mainline at all. Lee, what happened with this? Did it get held off until
> post-2.6.31 for merging to mainline?

Mel:

This patch, along with the interleaving of freeing persistent huge pages
are still in mmotm, awaiting the merge window.  I had sent out another
version suitable for mainline and stable--same patch with conflicts
resolved--but, apparently it didn't make mainline yet.

Lee


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] [PATCH] hugetlb: restore interleaving of bootmem huge pages
  2009-09-08 14:13     ` Lee Schermerhorn
@ 2009-09-09 21:56       ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2009-09-09 21:56 UTC (permalink / raw)
  To: Lee Schermerhorn
  Cc: mel, greg, eric.whitney, agl, linux-kernel, andi, rientjes, apw,
	stable

On Tue, 08 Sep 2009 10:13:35 -0400
Lee Schermerhorn <Lee.Schermerhorn@hp.com> wrote:

> On Tue, 2009-09-08 at 11:32 +0100, Mel Gorman wrote:
> > On Thu, Sep 03, 2009 at 01:33:39PM -0700, Greg KH wrote:
> > > On Fri, Jul 17, 2009 at 03:49:14PM -0400, Lee Schermerhorn wrote:
> > > > PATCH fix distribution of bootmem huge pages
> > > > 
> > > > Against: 2.6.31-rc3
> > > > 
> > > > For stable, applicable back through 2.6.27
> > > > 
> > > > [A version of this patch has been added to the -mm tree.  That patch
> > > > won't apply cleanly to mainline nor stable trees because of function
> > > > renaming.  This one should.]
> > > 
> > > What is the git commit id of this patch that is in Linus's tree?
> > > 
> > 
> > I can only find it in mmotm. It doesn't appear to have been merged to
> > mainline at all. Lee, what happened with this? Did it get held off until
> > post-2.6.31 for merging to mainline?
> 
> Mel:
> 
> This patch, along with the interleaving of freeing persistent huge pages
> are still in mmotm, awaiting the merge window.  I had sent out another
> version suitable for mainline and stable--same patch with conflicts
> resolved--but, apparently it didn't make mainline yet.
> 

I queued the original patch for 2.6.31 and -stable.

For 2.6.32 I queued a patch which reverts this same patch to make way
for all the new stuff.

It would have been better had the 2.6.31 minipatch come out first!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-09 21:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-17 19:49 [PATCH] hugetlb: restore interleaving of bootmem huge pages Lee Schermerhorn
2009-07-17 22:14 ` Andi Kleen
2009-09-03 20:33 ` [stable] " Greg KH
2009-09-08 10:32   ` Mel Gorman
2009-09-08 14:13     ` Lee Schermerhorn
2009-09-09 21:56       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox