Commit 38e0edb15bd07c6a0caf0cfe39f8f90bd98601b2
Committed by
Linus Torvalds
1 parent
cd52858c73
Exists in
master
and in
4 other branches
mm/apply_to_range: call pte function with lazy updates
Make the pte-level function in apply_to_range be called in lazy mmu mode, so that any pagetable modifications can be batched. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
mm/memory.c
... | ... | @@ -1645,6 +1645,8 @@ |
1645 | 1645 | |
1646 | 1646 | BUG_ON(pmd_huge(*pmd)); |
1647 | 1647 | |
1648 | + arch_enter_lazy_mmu_mode(); | |
1649 | + | |
1648 | 1650 | token = pmd_pgtable(*pmd); |
1649 | 1651 | |
1650 | 1652 | do { |
... | ... | @@ -1652,6 +1654,8 @@ |
1652 | 1654 | if (err) |
1653 | 1655 | break; |
1654 | 1656 | } while (pte++, addr += PAGE_SIZE, addr != end); |
1657 | + | |
1658 | + arch_leave_lazy_mmu_mode(); | |
1655 | 1659 | |
1656 | 1660 | if (mm != &init_mm) |
1657 | 1661 | pte_unmap_unlock(pte-1, ptl); |