diff options
Diffstat (limited to 'include/linux/migrate.h')
-rw-r--r-- | include/linux/migrate.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 14e6d2a88475..eaf867412f7a 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -6,18 +6,31 @@ | |||
6 | 6 | ||
7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); | 7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); |
8 | 8 | ||
9 | /* | ||
10 | * MIGRATE_ASYNC means never block | ||
11 | * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking | ||
12 | * on most operations but not ->writepage as the potential stall time | ||
13 | * is too significant | ||
14 | * MIGRATE_SYNC will block when migrating pages | ||
15 | */ | ||
16 | enum migrate_mode { | ||
17 | MIGRATE_ASYNC, | ||
18 | MIGRATE_SYNC_LIGHT, | ||
19 | MIGRATE_SYNC, | ||
20 | }; | ||
21 | |||
9 | #ifdef CONFIG_MIGRATION | 22 | #ifdef CONFIG_MIGRATION |
10 | #define PAGE_MIGRATION 1 | 23 | #define PAGE_MIGRATION 1 |
11 | 24 | ||
12 | extern void putback_lru_pages(struct list_head *l); | 25 | extern void putback_lru_pages(struct list_head *l); |
13 | extern int migrate_page(struct address_space *, | 26 | extern int migrate_page(struct address_space *, |
14 | struct page *, struct page *, bool); | 27 | struct page *, struct page *, enum migrate_mode); |
15 | extern int migrate_pages(struct list_head *l, new_page_t x, | 28 | extern int migrate_pages(struct list_head *l, new_page_t x, |
16 | unsigned long private, bool offlining, | 29 | unsigned long private, bool offlining, |
17 | bool sync); | 30 | enum migrate_mode mode); |
18 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, | 31 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, |
19 | unsigned long private, bool offlining, | 32 | unsigned long private, bool offlining, |
20 | bool sync); | 33 | enum migrate_mode mode); |
21 | 34 | ||
22 | extern int fail_migrate_page(struct address_space *, | 35 | extern int fail_migrate_page(struct address_space *, |
23 | struct page *, struct page *); | 36 | struct page *, struct page *); |
@@ -36,10 +49,10 @@ extern int migrate_huge_page_move_mapping(struct address_space *mapping, | |||
36 | static inline void putback_lru_pages(struct list_head *l) {} | 49 | static inline void putback_lru_pages(struct list_head *l) {} |
37 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 50 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
38 | unsigned long private, bool offlining, | 51 | unsigned long private, bool offlining, |
39 | bool sync) { return -ENOSYS; } | 52 | enum migrate_mode mode) { return -ENOSYS; } |
40 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, | 53 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, |
41 | unsigned long private, bool offlining, | 54 | unsigned long private, bool offlining, |
42 | bool sync) { return -ENOSYS; } | 55 | enum migrate_mode mode) { return -ENOSYS; } |
43 | 56 | ||
44 | static inline int migrate_prep(void) { return -ENOSYS; } | 57 | static inline int migrate_prep(void) { return -ENOSYS; } |
45 | static inline int migrate_prep_local(void) { return -ENOSYS; } | 58 | static inline int migrate_prep_local(void) { return -ENOSYS; } |