path: root/mm/page_alloc.c
diff options
authorMinchan Kim <>2009-06-16 15:32:50 -0700
committerLinus Torvalds <>2009-06-16 19:47:42 -0700
commitbce7394a3ef82b8477952fbab838e4a6e8cb47d2 (patch)
tree7e2f50300dc4edf471a67c1871f288f031fd84f7 /mm/page_alloc.c
parent96cb4df5ddf5e6d5785b5acd4003e3689b87f896 (diff)
page-allocator: reset wmark_min and inactive ratio of zone when hotplug happens
Solve two problems. Whenever memory hotplug sucessfully happens, zone->present_pages have to be changed. 1) Now memory hotplug calls setup_per_zone_wmark_min only when online_pages called, not offline_pages. It breaks balance. 2) If zone->present_pages is changed, we also have to change zone->inactive_ratio. That's because inactive_ratio depends on zone->present_pages. Signed-off-by: Minchan Kim <> Acked-by: Yasunori Goto <> Cc: Rik van Riel <> Cc: KOSAKI Motohiro <> Cc: Johannes Weiner <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/page_alloc.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 303607f1d32..00e293734fc 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4397,7 +4397,7 @@ static void setup_per_zone_lowmem_reserve(void)
* setup_per_zone_wmarks - called when min_free_kbytes changes
- * or when memory is hot-added
+ * or when memory is hot-{added|removed}
* Ensures that the watermark[min,low,high] values for each zone are set
* correctly with respect to min_free_kbytes.