]>
Commit | Line | Data |
---|---|---|
a5d76b54 KH |
1 | #ifndef __LINUX_PAGEISOLATION_H |
2 | #define __LINUX_PAGEISOLATION_H | |
3 | ||
4 | /* | |
5 | * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. | |
0815f3d8 | 6 | * If specified range includes migrate types other than MOVABLE or CMA, |
a5d76b54 KH |
7 | * this will fail with -EBUSY. |
8 | * | |
9 | * For isolating all pages in the range finally, the caller have to | |
10 | * free all pages in the range. test_page_isolated() can be used for | |
11 | * test it. | |
12 | */ | |
13 | extern int | |
0815f3d8 MN |
14 | start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, |
15 | unsigned migratetype); | |
a5d76b54 KH |
16 | |
17 | /* | |
18 | * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE. | |
19 | * target range is [start_pfn, end_pfn) | |
20 | */ | |
21 | extern int | |
0815f3d8 MN |
22 | undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, |
23 | unsigned migratetype); | |
a5d76b54 KH |
24 | |
25 | /* | |
0815f3d8 | 26 | * Test all pages in [start_pfn, end_pfn) are isolated or not. |
a5d76b54 | 27 | */ |
0815f3d8 | 28 | int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn); |
a5d76b54 KH |
29 | |
30 | /* | |
0815f3d8 | 31 | * Internal functions. Changes pageblock's migrate type. |
a5d76b54 KH |
32 | */ |
33 | extern int set_migratetype_isolate(struct page *page); | |
0815f3d8 | 34 | extern void unset_migratetype_isolate(struct page *page, unsigned migratetype); |
a5d76b54 KH |
35 | |
36 | ||
37 | #endif |