Skip to content

Commit 1dd49bf

Browse files
Mel GormanIngo Molnar
authored andcommitted
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>
1 parent 959f585 commit 1dd49bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mm/huge_memory.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,8 +1325,11 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
13251325

13261326
check_same:
13271327
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;
13291331
goto out_unlock;
1332+
}
13301333
clear_pmdnuma:
13311334
pmd = pmd_mknonnuma(pmd);
13321335
set_pmd_at(mm, haddr, pmdp, pmd);

0 commit comments

Comments
 (0)