Skip to contentSkip to conversation

mm/apply_to_range: call pte function with lazy updates

PATCH In review Jeremy Fitzhardinge 1 participant 1 message Nov 13, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 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.

---
mm/memory.c | 4 ++++

1 file changed, 4 insertions(+)

===================================================================

mm/memory.c +0 -0
@@ -1545,6 +1545,8 @@
 
	BUG_ON(pmd_huge(*pmd));

+ arch_enter_lazy_mmu_mode();
+

	token = pmd_pgtable(*pmd);

	do {
@@ -1552,6 +1554,8 @@
		if (err)
			break;
	} while (pte++, addr += PAGE_SIZE, addr != end);

+
+ arch_leave_lazy_mmu_mode();

	if (mm != &init_mm)
		pte_unmap_unlock(pte-1, ptl);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>