summaryrefslogtreecommitdiff
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2009-09-21 17:01:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 07:17:25 -0700
commit112067f0905b2de862c607ee62411cf47d2fe5c4 (patch)
tree55575b100292b764f945e4d9395989e8a734f883 /mm/memory_hotplug.c
parent478b81fd84a299adb401dbbae296f3767e552999 (diff)
downloadlinux-rpi-112067f0905b2de862c607ee62411cf47d2fe5c4.tar.gz
linux-rpi-112067f0905b2de862c607ee62411cf47d2fe5c4.tar.bz2
linux-rpi-112067f0905b2de862c607ee62411cf47d2fe5c4.zip
memory hotplug: update zone pcp at memory online
In my test, 128M memory is hot added, but zone's pcp batch is 0, which is an obvious error. When pages are onlined, zone pcp should be updated accordingly. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Yakui Zhao <yakui.zhao@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index e4412a676c88..616236e6343f 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -422,6 +422,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
zone->present_pages += onlined_pages;
zone->zone_pgdat->node_present_pages += onlined_pages;
+ zone_pcp_update(zone);
setup_per_zone_wmarks();
calculate_zone_inactive_ratio(zone);
if (onlined_pages) {