]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/linux/page-isolation.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[mirror_ubuntu-zesty-kernel.git] / include / linux / page-isolation.h
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.
6 * If specified range includes migrate types other than MOVABLE or CMA,
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
14 start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
15 unsigned migratetype);
16
17 /*
18 * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
19 * target range is [start_pfn, end_pfn)
20 */
21 extern int
22 undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
23 unsigned migratetype);
24
25 /*
26 * Test all pages in [start_pfn, end_pfn) are isolated or not.
27 */
28 int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
29
30 /*
31 * Internal functions. Changes pageblock's migrate type.
32 */
33 extern int set_migratetype_isolate(struct page *page);
34 extern void unset_migratetype_isolate(struct page *page, unsigned migratetype);
35
36
37 #endif