]> git.baikalelectronics.ru Git - kernel.git/commit
mm: Add notifier in pageblock isolation for balloon drivers
authorRobert Jennings <rcj@linux.vnet.ibm.com>
Thu, 17 Dec 2009 14:44:38 +0000 (14:44 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 18 Dec 2009 03:53:36 +0000 (14:53 +1100)
commit39e06c0828b49f1c1541df67070669970581068c
tree7240ccf6ba713cc180d388a28f00c1a43293bc14
parent65bae8948c986836164730d684f472bfe5ab6578
mm: Add notifier in pageblock isolation for balloon drivers

Memory balloon drivers can allocate a large amount of memory which is not
movable but could be freed to accomodate memory hotplug remove.

Prior to calling the memory hotplug notifier chain the memory in the
pageblock is isolated.  Currently, if the migrate type is not
MIGRATE_MOVABLE the isolation will not proceed, causing the memory removal
for that page range to fail.

Rather than failing pageblock isolation if the migrateteype is not
MIGRATE_MOVABLE, this patch checks if all of the pages in the pageblock,
and not on the LRU, are owned by a registered balloon driver (or other
entity) using a notifier chain.  If all of the non-movable pages are owned
by a balloon, they can be freed later through the memory notifier chain
and the range can still be isolated in set_migratetype_isolate().

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Brian King <brking@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Gerald Schaefer <geralds@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/base/memory.c
include/linux/memory.h
mm/page_alloc.c