[PATCH] TEST THEORY ABOUT MIGRATION AND DEVICE
From: JÃrÃme Glisse
Date: Tue Jul 11 2017 - 14:24:59 EST
---
mm/migrate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 643ea61ca9bb..10e99770da91 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2235,7 +2235,9 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
*/
page_remove_rmap(page, false);
put_page(page);
- unmapped++;
+
+ if (pte_present(pte))
+ unmapped++;
}
next:
@@ -2313,6 +2315,7 @@ static bool migrate_vma_check_page(struct page *page)
if (is_zone_device_page(page)) {
if (is_device_private_page(page)) {
extra++;
+ return true;
} else
/* Other ZONE_DEVICE memory type are not supported */
return false;
--
2.13.0
--dDRMvlgZJXvWKvBx--