From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with SMTP id 866AD6B01EF for ; Fri, 16 Apr 2010 11:55:48 -0400 (EDT) Date: Fri, 16 Apr 2010 10:55:07 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH] mempolicy:add GFP_THISNODE when allocing new page In-Reply-To: Message-ID: References: <1270522777-9216-1-git-send-email-lliubbo@gmail.com> <20100413083855.GS25756@csn.ul.ie> <20100416111539.GC19264@csn.ul.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Bob Liu Cc: Mel Gorman , kamezawa.hiroyu@jp.fujitsu.com, minchan.kim@gmail.com, akpm@linux-foundation.org, linux-mm@kvack.org, andi@firstfloor.org, rientjes@google.com, lee.schermerhorn@hp.com List-ID: On Fri, 16 Apr 2010, Bob Liu wrote: > Hmm. > What about this change? If the from_nodes and to_nodes' weight is different, > then we can don't preserv of the relative position of the page to the beginning > of the node set. This case if a page allocation from the dest node > failed, it will > be allocated from the next node instead of early return. Understand what you are doing first. The fallback is already there. > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > index 08f40a2..094d092 100644 > --- a/mm/mempolicy.c > +++ b/mm/mempolicy.c > @@ -842,7 +842,8 @@ static void migrate_page_add(struct page *page, > struct list_head *pagelist, > > static struct page *new_node_page(struct page *page, unsigned long > node, int **x) > { > - return alloc_pages_exact_node(node, GFP_HIGHUSER_MOVABLE, 0); > + return alloc_pages_exact_node(node, > + GFP_HIGHUSER_MOVABLE | GFP_THISNODE, 0); You eliminate falling back to the next node? GFP_THISNODE forces allocation from the node. Without it we will fallback. -- 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: email@kvack.org