memory unplug: page isolation
authorKAMEZAWA Hiroyuki <[email protected]>
Tue, 16 Oct 2007 08:26:11 +0000 (01:26 -0700)
committerLinus Torvalds <[email protected]>
Tue, 16 Oct 2007 16:43:02 +0000 (09:43 -0700)
commita5d76b54a3f3a40385d7f76069a2feac9f1bad63
treef58c432a4224b3be032bd4a4afa79dfa55d198a6
parent75884fb1c6388f3713ddcca662f3647b3129aaeb
memory unplug: page isolation

Implement generic chunk-of-pages isolation method by using page grouping ops.

This patch add MIGRATE_ISOLATE to MIGRATE_TYPES. By this
 - MIGRATE_TYPES increases.
 - bitmap for migratetype is enlarged.

pages of MIGRATE_ISOLATE migratetype will not be allocated even if it is free.
By this, you can isolated *freed* pages from users. How-to-free pages is not
a purpose of this patch. You may use reclaim and migrate codes to free pages.

If start_isolate_page_range(start,end) is called,
 - migratetype of the range turns to be MIGRATE_ISOLATE  if
   its type is MIGRATE_MOVABLE. (*) this check can be updated if other
   memory reclaiming works make progress.
 - MIGRATE_ISOLATE is not on migratetype fallback list.
 - All free pages and will-be-freed pages are isolated.
To check all pages in the range are isolated or not,  use test_pages_isolated(),
To cancel isolation, use undo_isolate_page_range().

Changes V6 -> V7
 - removed unnecessary #ifdef

There are HOLES_IN_ZONE handling codes...I'm glad if we can remove them..

Signed-off-by: Yasunori Goto <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/mmzone.h
include/linux/page-isolation.h [new file with mode: 0644]
include/linux/pageblock-flags.h
mm/Makefile
mm/page_alloc.c
mm/page_isolation.c [new file with mode: 0644]