diff options
author | Xishi Qiu <qiuxishi@huawei.com> | 2012-10-08 19:31:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:43 -0400 |
commit | 1e8537baacd59e96bbe5f8d3d32feafd11f509fe (patch) | |
tree | 43c06a9d398687ef2c7225ab1af0ae8ed4e24676 | |
parent | 38a76013ad809beb0b52f60d365c960d035bd83c (diff) |
memory-hotplug: build zonelists when offlining pages
online_pages() does build_all_zonelists() and zone_pcp_update(), I think
offline_pages() should do it too.
When the zone has no memory to allocate, remove it from other nodes'
zonelists. zone_batchsize() depends on zone's present pages, if zone's
present pages are changed, zone's pcp should be updated.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memory_hotplug.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 6a5b90d0cfd7..b35016156c19 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -970,8 +970,13 @@ repeat: | |||
970 | 970 | ||
971 | init_per_zone_wmark_min(); | 971 | init_per_zone_wmark_min(); |
972 | 972 | ||
973 | if (!populated_zone(zone)) | 973 | if (!populated_zone(zone)) { |
974 | zone_pcp_reset(zone); | 974 | zone_pcp_reset(zone); |
975 | mutex_lock(&zonelists_mutex); | ||
976 | build_all_zonelists(NULL, NULL); | ||
977 | mutex_unlock(&zonelists_mutex); | ||
978 | } else | ||
979 | zone_pcp_update(zone); | ||
975 | 980 | ||
976 | if (!node_present_pages(node)) { | 981 | if (!node_present_pages(node)) { |
977 | node_clear_state(node, N_HIGH_MEMORY); | 982 | node_clear_state(node, N_HIGH_MEMORY); |