blob: 883c992490334ba27dcbcd5ba4dcad897e5dfff6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Andrew Morton6536e312012-01-20 14:33:53 -08002#ifndef MIGRATE_MODE_H_INCLUDED
3#define MIGRATE_MODE_H_INCLUDED
4/*
5 * MIGRATE_ASYNC means never block
6 * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking
7 * on most operations but not ->writepage as the potential stall time
8 * is too significant
9 * MIGRATE_SYNC will block when migrating pages
Jérôme Glisse2916ecc2017-09-08 16:12:06 -070010 * MIGRATE_SYNC_NO_COPY will block when migrating pages but will not copy pages
11 * with the CPU. Instead, page copy happens outside the migratepage()
12 * callback and is likely using a DMA engine. See migrate_vma() and HMM
13 * (mm/hmm.c) for users of this mode.
Andrew Morton6536e312012-01-20 14:33:53 -080014 */
15enum migrate_mode {
16 MIGRATE_ASYNC,
17 MIGRATE_SYNC_LIGHT,
18 MIGRATE_SYNC,
Jérôme Glisse2916ecc2017-09-08 16:12:06 -070019 MIGRATE_SYNC_NO_COPY,
Andrew Morton6536e312012-01-20 14:33:53 -080020};
21
22#endif /* MIGRATE_MODE_H_INCLUDED */