mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 05:42:46 +01:00
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 <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Venkatesh Pallipadi <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
cd52858c73
commit
38e0edb15b
1 file changed
+4
@@ -1645,6 +1645,8 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
|
||||
|
||||
BUG_ON(pmd_huge(*pmd));
|
||||
|
||||
arch_enter_lazy_mmu_mode();
|
||||
|
||||
token = pmd_pgtable(*pmd);
|
||||
|
||||
do {
|
||||
@@ -1653,6 +1655,8 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
|
||||
break;
|
||||
} while (pte++, addr += PAGE_SIZE, addr != end);
|
||||
|
||||
arch_leave_lazy_mmu_mode();
|
||||
|
||||
if (mm != &init_mm)
|
||||
pte_unmap_unlock(pte-1, ptl);
|
||||
return err;
|
||||
|
||||
Reference in new issue
Block a user