Skip to content

Commit 1dd49bf

Browse files
Mel GormanIngo Molnar
Mel Gorman
authored and
Ingo Molnar
committed
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 <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Srikar Dronamraju <[email protected]> Cc: <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
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)