[PATCH 076/166] mempolicy: force NUMA balancing

From: Fengguang Wu
Date: Sun Sep 30 2018 - 07:22:27 EST


Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---
mm/memory.c | 3 ++-
mm/mempolicy.c | 5 -----
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index c467102a5cbc..20c7efdff63b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3775,7 +3775,8 @@ static int numa_migrate_prep(struct page *page, struct vm_area_struct *vma,
*flags |= TNF_FAULT_LOCAL;
}

- return mpol_misplaced(page, vma, addr);
+ return 0;
+ /* return mpol_misplaced(page, vma, addr); */
}

static vm_fault_t do_numa_page(struct vm_fault *vmf)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index da858f794eb6..21dc6ba1d062 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2295,8 +2295,6 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long
int ret = -1;

pol = get_vma_policy(vma, addr);
- if (!(pol->flags & MPOL_F_MOF))
- goto out;

switch (pol->mode) {
case MPOL_INTERLEAVE:
@@ -2336,9 +2334,6 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long
/* Migrate the page towards the node whose CPU is referencing it */
if (pol->flags & MPOL_F_MORON) {
polnid = thisnid;
-
- if (!should_numa_migrate_memory(current, page, curnid, thiscpu))
- goto out;
}

if (curnid != polnid)
--
2.15.0


--sbnmklyntwize2li--