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@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>