summaryrefslogtreecommitdiffstats
path: root/include/linux/migrate_mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/migrate_mode.h')
-rw-r--r--include/linux/migrate_mode.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/migrate_mode.h b/include/linux/migrate_mode.h
new file mode 100644
index 000000000..05102d4d2
--- /dev/null
+++ b/include/linux/migrate_mode.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef MIGRATE_MODE_H_INCLUDED
+#define MIGRATE_MODE_H_INCLUDED
+/*
+ * 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,
+};
+
+enum migrate_reason {
+ MR_COMPACTION,
+ MR_MEMORY_FAILURE,
+ MR_MEMORY_HOTPLUG,
+ MR_SYSCALL, /* also applies to cpusets */
+ MR_MEMPOLICY_MBIND,
+ MR_NUMA_MISPLACED,
+ MR_CONTIG_RANGE,
+ MR_LONGTERM_PIN,
+ MR_DEMOTION,
+ MR_DAMON,
+ MR_NEVER, /* page has never been migrated */
+ MR_TYPES
+};
+
+#endif /* MIGRATE_MODE_H_INCLUDED */