0001
0002 #ifndef __LINUX_PAGEISOLATION_H
0003 #define __LINUX_PAGEISOLATION_H
0004
0005 #ifdef CONFIG_MEMORY_ISOLATION
0006 static inline bool has_isolate_pageblock(struct zone *zone)
0007 {
0008 return zone->nr_isolate_pageblock;
0009 }
0010 static inline bool is_migrate_isolate_page(struct page *page)
0011 {
0012 return get_pageblock_migratetype(page) == MIGRATE_ISOLATE;
0013 }
0014 static inline bool is_migrate_isolate(int migratetype)
0015 {
0016 return migratetype == MIGRATE_ISOLATE;
0017 }
0018 #else
0019 static inline bool has_isolate_pageblock(struct zone *zone)
0020 {
0021 return false;
0022 }
0023 static inline bool is_migrate_isolate_page(struct page *page)
0024 {
0025 return false;
0026 }
0027 static inline bool is_migrate_isolate(int migratetype)
0028 {
0029 return false;
0030 }
0031 #endif
0032
0033 #define MEMORY_OFFLINE 0x1
0034 #define REPORT_FAILURE 0x2
0035
0036 void set_pageblock_migratetype(struct page *page, int migratetype);
0037 int move_freepages_block(struct zone *zone, struct page *page,
0038 int migratetype, int *num_movable);
0039
0040
0041
0042
0043 int
0044 start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
0045 int migratetype, int flags, gfp_t gfp_flags);
0046
0047
0048
0049
0050
0051 void
0052 undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
0053 int migratetype);
0054
0055
0056
0057
0058 int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
0059 int isol_flags);
0060
0061 struct page *alloc_migrate_target(struct page *page, unsigned long private);
0062
0063 #endif