]> git.karo-electronics.de Git - linux-beck.git/commit
page-allocator: reset wmark_min and inactive ratio of zone when hotplug happens
authorMinchan Kim <minchan.kim@gmail.com>
Tue, 16 Jun 2009 22:32:50 +0000 (15:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:42 +0000 (19:47 -0700)
commitbce7394a3ef82b8477952fbab838e4a6e8cb47d2
tree7e2f50300dc4edf471a67c1871f288f031fd84f7
parent96cb4df5ddf5e6d5785b5acd4003e3689b87f896
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 <minchan.kim@gmail.com>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c
mm/page_alloc.c