mm: page_isolation: MIGRATE_CMA isolation functions added
This commit changes various functions that change pages and pageblocks migrate type between MIGRATE_ISOLATE and MIGRATE_MOVABLE in such a way as to allow to work with MIGRATE_CMA migrate type. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Tested-by: Rob Clark <rob.clark@linaro.org> Tested-by: Ohad Ben-Cohen <ohad@wizery.com> Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Tested-by: Robert Nelson <robertcnelson@gmail.com> Tested-by: Barry Song <Baohua.Song@csr.com>
This commit is contained in:

committed by
Marek Szyprowski

parent
47118af076
commit
0815f3d81d
@@ -3,7 +3,7 @@
|
||||
|
||||
/*
|
||||
* Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE.
|
||||
* If specified range includes migrate types other than MOVABLE,
|
||||
* If specified range includes migrate types other than MOVABLE or CMA,
|
||||
* this will fail with -EBUSY.
|
||||
*
|
||||
* For isolating all pages in the range finally, the caller have to
|
||||
@@ -11,27 +11,27 @@
|
||||
* test it.
|
||||
*/
|
||||
extern int
|
||||
start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn);
|
||||
start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
|
||||
unsigned migratetype);
|
||||
|
||||
/*
|
||||
* Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
|
||||
* target range is [start_pfn, end_pfn)
|
||||
*/
|
||||
extern int
|
||||
undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn);
|
||||
undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
|
||||
unsigned migratetype);
|
||||
|
||||
/*
|
||||
* test all pages in [start_pfn, end_pfn)are isolated or not.
|
||||
* Test all pages in [start_pfn, end_pfn) are isolated or not.
|
||||
*/
|
||||
extern int
|
||||
test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
|
||||
int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
|
||||
|
||||
/*
|
||||
* Internal funcs.Changes pageblock's migrate type.
|
||||
* Please use make_pagetype_isolated()/make_pagetype_movable().
|
||||
* Internal functions. Changes pageblock's migrate type.
|
||||
*/
|
||||
extern int set_migratetype_isolate(struct page *page);
|
||||
extern void unset_migratetype_isolate(struct page *page);
|
||||
extern void unset_migratetype_isolate(struct page *page, unsigned migratetype);
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user