diff options
| author | Jérôme Glisse <jglisse@redhat.com> | 2017-09-08 19:12:17 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-08 21:26:46 -0400 |
| commit | a5430dda8a3a1cdd532e37270e6f36436241b6e7 (patch) | |
| tree | 86a2edaf2d6aa11f4e76bcc3b0103cfb0bb2de09 /include | |
| parent | 8c3328f1f36a5efe817ad4e06497af601936a460 (diff) | |
mm/migrate: support un-addressable ZONE_DEVICE page in migration
Allow to unmap and restore special swap entry of un-addressable
ZONE_DEVICE memory.
Link: http://lkml.kernel.org/r/20170817000548.32038-17-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Nellans <dnellans@nvidia.com>
Cc: Evgeny Baskakov <ebaskakov@nvidia.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Mark Hairgrove <mhairgrove@nvidia.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Sherry Cheung <SCheung@nvidia.com>
Cc: Subhash Gutti <sgutti@nvidia.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Bob Liu <liubo95@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/migrate.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 8f73cebfc3f5..8dc8f0a3f1af 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
| @@ -159,12 +159,18 @@ static inline int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
| 159 | 159 | ||
| 160 | #ifdef CONFIG_MIGRATION | 160 | #ifdef CONFIG_MIGRATION |
| 161 | 161 | ||
| 162 | /* | ||
| 163 | * Watch out for PAE architecture, which has an unsigned long, and might not | ||
| 164 | * have enough bits to store all physical address and flags. So far we have | ||
| 165 | * enough room for all our flags. | ||
| 166 | */ | ||
| 162 | #define MIGRATE_PFN_VALID (1UL << 0) | 167 | #define MIGRATE_PFN_VALID (1UL << 0) |
| 163 | #define MIGRATE_PFN_MIGRATE (1UL << 1) | 168 | #define MIGRATE_PFN_MIGRATE (1UL << 1) |
| 164 | #define MIGRATE_PFN_LOCKED (1UL << 2) | 169 | #define MIGRATE_PFN_LOCKED (1UL << 2) |
| 165 | #define MIGRATE_PFN_WRITE (1UL << 3) | 170 | #define MIGRATE_PFN_WRITE (1UL << 3) |
| 166 | #define MIGRATE_PFN_ERROR (1UL << 4) | 171 | #define MIGRATE_PFN_DEVICE (1UL << 4) |
| 167 | #define MIGRATE_PFN_SHIFT 5 | 172 | #define MIGRATE_PFN_ERROR (1UL << 5) |
| 173 | #define MIGRATE_PFN_SHIFT 6 | ||
| 168 | 174 | ||
| 169 | static inline struct page *migrate_pfn_to_page(unsigned long mpfn) | 175 | static inline struct page *migrate_pfn_to_page(unsigned long mpfn) |
| 170 | { | 176 | { |
