Skip to content

Commit

Permalink
mm: reinstante dropped pmd_trans_splitting() check
Browse files Browse the repository at this point in the history
The check for a pmd being in the process of being split was dropped by
mistake by commit d10e63f ("mm: numa: Create basic numa page
hinting infrastructure"). Put it back.

Reported-by: Dave Jones <davej@redhat.com>
Debugged-by: Hillf Danton <dhillf@gmail.com>
Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Kirill Shutemov <kirill@shutemov.name>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Jan 9, 2013
1 parent 08c097f commit e53289c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -3711,6 +3711,14 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
if (pmd_trans_huge(orig_pmd)) {
unsigned int dirty = flags & FAULT_FLAG_WRITE;

/*
* If the pmd is splitting, return and retry the
* the fault. Alternative: wait until the split
* is done, and goto retry.
*/
if (pmd_trans_splitting(orig_pmd))
return 0;

if (pmd_numa(orig_pmd))
return do_huge_pmd_numa_page(mm, vma, address,
orig_pmd, pmd);
Expand Down

0 comments on commit e53289c

Please sign in to comment.