Commit 1dd49bfa3465756b3ce72214b58a33e4afb67aa3
Committed by
Ingo Molnar
1 parent
959f58544b
Exists in
master
and in
20 other branches
mm: numa: Do not account for a hinting fault if we raced
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> Cc: <stable@kernel.org> 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>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
mm/huge_memory.c
... | ... | @@ -1325,8 +1325,11 @@ |
1325 | 1325 | |
1326 | 1326 | check_same: |
1327 | 1327 | spin_lock(&mm->page_table_lock); |
1328 | - if (unlikely(!pmd_same(pmd, *pmdp))) | |
1328 | + if (unlikely(!pmd_same(pmd, *pmdp))) { | |
1329 | + /* Someone else took our fault */ | |
1330 | + current_nid = -1; | |
1329 | 1331 | goto out_unlock; |
1332 | + } | |
1330 | 1333 | clear_pmdnuma: |
1331 | 1334 | pmd = pmd_mknonnuma(pmd); |
1332 | 1335 | set_pmd_at(mm, haddr, pmdp, pmd); |