From: Yinghai Lu Date: Tue, 16 Jun 2009 22:33:00 +0000 (-0700) Subject: page-allocator: clear N_HIGH_MEMORY map before we set it again X-Git-Tag: upstream/snapshot3+hdmi~18577^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73d60b7f747176dbdff826c4127d22e1fd3f9f74;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git page-allocator: clear N_HIGH_MEMORY map before we set it again SRAT tables may contains nodes of very small size. The arch code may decide to not activate such a node. However, currently the early boot code sets N_HIGH_MEMORY for such nodes. These nodes therefore seem to be active although these nodes have no present pages. For 64bit N_HIGH_MEMORY == N_NORMAL_MEMORY, so that works for 64 bit too Signed-off-by: Yinghai Lu Tested-by: Jack Steiner Acked-by: Christoph Lameter Cc: Mel Gorman Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c5fb017..6407cbf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4204,6 +4204,11 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn) early_node_map[i].start_pfn, early_node_map[i].end_pfn); + /* + * find_zone_movable_pfns_for_nodes/early_calculate_totalpages init + * that node_mask, clear it at first + */ + nodes_clear(node_states[N_HIGH_MEMORY]); /* Initialise every node */ mminit_verify_pageflags_layout(); setup_nr_node_ids();