From: Bob Picco Date: Tue, 30 Jan 2007 10:11:09 +0000 (-0800) Subject: [IA64] register memory ranges in a consistent manner X-Git-Tag: v2.6.21-rc1~92^2~36^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=139b830477ccdca21b68c40f9a83ec327e65eb56;p=pandora-kernel.git [IA64] register memory ranges in a consistent manner While pursuing and unrelated issue with 64Mb granules I noticed a problem related to inconsistent use of add_active_range. There doesn't appear any reason to me why FLATMEM versus DISCONTIG_MEM should register memory to add_active_range with different code. So I've changed the code into a common implementation. The other subtle issue fixed by this patch was calling add_active_range in count_node_pages before granule aligning is performed. We were lucky with 16MB granules but not so with 64MB granules. count_node_pages has reserved regions filtered out and as a consequence linked kernel text and data aren't covered by calls to count_node_pages. So linked kernel regions wasn't reported to add_active_regions. This resulted in free_initmem causing numerous bad_page reports. This won't occur with this patch because now all known memory regions are reported by register_active_ranges. Acked-by: Mel Gorman Signed-off-by: Bob Picco Acked-by: Simon Horman Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- Reading git-diff-tree failed