aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2013-10-07 06:28:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-12 22:05:33 -0500
commit699ba929e88a0c2b172e7beebf10fd37ef120142 (patch)
tree829fb086fc9abe080dfffaf0b499608e4aaecab6 /mm
parent165b4f8bf37ba929924e9099bd9a1ee5031cf4e7 (diff)
mm: numa: Do not account for a hinting fault if we raced
commit 1dd49bfa3465756b3ce72214b58a33e4afb67aa3 upstream. If another task handled a hinting fault in parallel then do not double account for it. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1381141781-10992-5-git-send-email-mgorman@suse.de Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/huge_memory.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 0164b09c1e99..7b09fe75799c 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1335,8 +1335,11 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
1335 1335
1336check_same: 1336check_same:
1337 spin_lock(&mm->page_table_lock); 1337 spin_lock(&mm->page_table_lock);
1338 if (unlikely(!pmd_same(pmd, *pmdp))) 1338 if (unlikely(!pmd_same(pmd, *pmdp))) {
1339 /* Someone else took our fault */
1340 current_nid = -1;
1339 goto out_unlock; 1341 goto out_unlock;
1342 }
1340clear_pmdnuma: 1343clear_pmdnuma:
1341 pmd = pmd_mknonnuma(pmd); 1344 pmd = pmd_mknonnuma(pmd);
1342 set_pmd_at(mm, haddr, pmdp, pmd); 1345 set_pmd_at(mm, haddr, pmdp, pmd);