|
@@ -27,6 +27,7 @@
|
|
|
#include <linux/pkeys.h>
|
|
#include <linux/pkeys.h>
|
|
|
#include <linux/ksm.h>
|
|
#include <linux/ksm.h>
|
|
|
#include <linux/uaccess.h>
|
|
#include <linux/uaccess.h>
|
|
|
|
|
+#include <linux/mm_inline.h>
|
|
|
#include <asm/pgtable.h>
|
|
#include <asm/pgtable.h>
|
|
|
#include <asm/cacheflush.h>
|
|
#include <asm/cacheflush.h>
|
|
|
#include <asm/mmu_context.h>
|
|
#include <asm/mmu_context.h>
|
|
@@ -89,6 +90,14 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
|
|
|
page_mapcount(page) != 1)
|
|
page_mapcount(page) != 1)
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * While migration can move some dirty pages,
|
|
|
|
|
+ * it cannot move them all from MIGRATE_ASYNC
|
|
|
|
|
+ * context.
|
|
|
|
|
+ */
|
|
|
|
|
+ if (page_is_file_cache(page) && PageDirty(page))
|
|
|
|
|
+ continue;
|
|
|
|
|
+
|
|
|
/* Avoid TLB flush if possible */
|
|
/* Avoid TLB flush if possible */
|
|
|
if (pte_protnone(oldpte))
|
|
if (pte_protnone(oldpte))
|
|
|
continue;
|
|
continue;
|