summaryrefslogtreecommitdiff
path: root/include/linux/migrate_mode.h
diff options
context:
space:
mode:
authorJérôme Glisse <jglisse@redhat.com>2017-03-23 17:42:47 -0400
committerJérôme Glisse <jglisse@redhat.com>2017-08-09 18:13:29 -0400
commit467169ed94e0803d95d53fa668ce6342e32c4fbf (patch)
tree376366f58ebac01be9b5d32b5729e092e166dac3 /include/linux/migrate_mode.h
parenta0b426342dfe35f5a9887ca2cbcc11fe2220a6a2 (diff)
mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY
Introduce a new migration mode that allow to offload the copy to a device DMA engine. This changes the workflow of migration and not all address_space migratepage callback can support this. So it needs to be tested in those cases. This is intended to be use by migrate_vma() which itself is use for thing like HMM (see include/linux/hmm.h). Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Diffstat (limited to 'include/linux/migrate_mode.h')
-rw-r--r--include/linux/migrate_mode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/migrate_mode.h b/include/linux/migrate_mode.h
index ebf3d89a3919..bdf66af9b937 100644
--- a/include/linux/migrate_mode.h
+++ b/include/linux/migrate_mode.h
@@ -6,11 +6,16 @@
* on most operations but not ->writepage as the potential stall time
* is too significant
* MIGRATE_SYNC will block when migrating pages
+ * MIGRATE_SYNC_NO_COPY will block when migrating pages but will not copy pages
+ * with the CPU. Instead, page copy happens outside the migratepage()
+ * callback and is likely using a DMA engine. See migrate_vma() and HMM
+ * (mm/hmm.c) for users of this mode.
*/
enum migrate_mode {
MIGRATE_ASYNC,
MIGRATE_SYNC_LIGHT,
MIGRATE_SYNC,
+ MIGRATE_SYNC_NO_COPY,
};
#endif /* MIGRATE_MODE_H_INCLUDED */