From: Lee Schermerhorn Date: Tue, 15 Dec 2009 01:58:15 +0000 (-0800) Subject: hugetlb: rework hstate_next_node_* functions X-Git-Tag: v2.6.33-rc1~256 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a76db099709388ae4126c4f441358b97c6ba20c;p=pandora-kernel.git hugetlb: rework hstate_next_node_* functions Modify the hstate_next_node* functions to allow them to be called to obtain the "start_nid". Then, whereas prior to this patch we unconditionally called hstate_next_node_to_{alloc|free}(), whether or not we successfully allocated/freed a huge page on the node, now we only call these functions on failure to alloc/free to advance to next allowed node. Factor out the next_node_allowed() function to handle wrap at end of node_online_map. In this version, the allowed nodes include all of the online nodes. Signed-off-by: Lee Schermerhorn Reviewed-by: Mel Gorman Acked-by: David Rientjes Reviewed-by: Andi Kleen Cc: KAMEZAWA Hiroyuki Cc: Randy Dunlap Cc: Nishanth Aravamudan Cc: Andi Kleen Cc: Adam Litke Cc: Andy Whitcroft Cc: Eric Whitney Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed