aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/migrate.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/migrate.h')
-rw-r--r--include/linux/migrate.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 82b1faf..1a1fcfd 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -6,20 +6,33 @@
typedef struct page *new_page_t(struct page *, unsigned long private, int **);
+/*
+ * MIGRATE_ASYNC means never block
+ * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking
+ * on most operations but not ->writepage as the potential stall time
+ * is too significant
+ * MIGRATE_SYNC will block when migrating pages
+ */
+enum migrate_mode {
+ MIGRATE_ASYNC,
+ MIGRATE_SYNC_LIGHT,
+ MIGRATE_SYNC,
+};
+
#ifdef CONFIG_MIGRATION
#define PAGE_MIGRATION 1
extern void putback_lru_pages(struct list_head *l);
extern int migrate_page(struct address_space *,
- struct page *, struct page *);
+ struct page *, struct page *, enum migrate_mode);
#ifndef CONFIG_DMA_CMA
extern int migrate_pages(struct list_head *l, new_page_t x,
unsigned long private, bool offlining,
- bool sync);
+ enum migrate_mode mode);
#else
extern int migrate_pages(struct list_head *l, new_page_t x,
unsigned long private, bool offlining,
- bool sync, int tries);
+ enum migrate_mode mode, int tries);
extern int migrate_replace_cma_page(struct page *oldpage,
struct page **newpage);
@@ -27,7 +40,7 @@ extern int migrate_replace_cma_page(struct page *oldpage,
extern int migrate_huge_pages(struct list_head *l, new_page_t x,
unsigned long private, bool offlining,
- bool sync);
+ enum migrate_mode mode);
extern int fail_migrate_page(struct address_space *,
struct page *, struct page *);
@@ -47,6 +60,7 @@ static inline void putback_lru_pages(struct list_head *l) {}
#ifndef CONFIG_DMA_CMA
static inline int migrate_pages(struct list_head *l, new_page_t x,
unsigned long private, bool offlining,
+<<<<<<< HEAD
bool sync) { return -ENOSYS; }
#else
static inline int migrate_pages(struct list_head *l, new_page_t x,
@@ -57,9 +71,12 @@ static inline int migrate_replace_cma_page(struct page *oldpage,
struct page **newpage) { return -ENOSYS; }
#endif
+=======
+ enum migrate_mode mode) { return -ENOSYS; }
+>>>>>>> 54ea5b40f067cf098cac639973c6628c6944cfb2
static inline int migrate_huge_pages(struct list_head *l, new_page_t x,
unsigned long private, bool offlining,
- bool sync) { return -ENOSYS; }
+ enum migrate_mode mode) { return -ENOSYS; }
static inline int migrate_prep(void) { return -ENOSYS; }
static inline int migrate_prep_local(void) { return -ENOSYS; }