From: Wen Congyang Date: Fri, 9 Nov 2012 03:04:03 +0000 (+1100) Subject: memory-hotplug: build zonelist if a zone is populated after onlining pages X-Git-Tag: next-20121112~5^2~240 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8bdc71c2c91b21fae6157cc38e3bc5347b877b5f;p=karo-tx-linux.git memory-hotplug: build zonelist if a zone is populated after onlining pages After "memory-hotplug: allocate zone's pcp before onlining pages", we build zone list before onlining pages to allocate zone's pcp. But the zone doesn't have pages before onlining pages, and the zone is not in zonelist, so we still need to build zonelist after onlining pages. Signed-off-by: Wen Congyang Cc: David Rientjes Cc: Jiang Liu Cc: Len Brown Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Christoph Lameter Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 5c8ad6dcd18f..63ea7df124fa 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -529,7 +529,9 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages) zone->zone_pgdat->node_present_pages += onlined_pages; if (onlined_pages) { node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); - if (!need_zonelists_rebuild) + if (need_zonelists_rebuild) + build_all_zonelists(NULL, NULL); + else zone_pcp_update(zone); }