Re: [PATCH v2 1/6] mm: Make lazy MMU mode context-aware

Alexander Gordeev
2026-04-21T04:57:37Z

On Mon, Apr 20, 2026 at 10:45:22AM +0200, Kevin Brodsky wrote:
> On 15/04/2026 17:01, Alexander Gordeev wrote:
> > +/**
> > + * lazy_mmu_mode_enable_for_pte_range() - Enable the lazy MMU mode with a speedup hint.
> > + * @mm: Address space the pages are mapped into.
> > + * @addr: Start address of the range.
> > + * @end: End address of the range.
> > + * @ptep: Page table pointer for the first entry.
> > + *
> > + * Enters a new lazy MMU mode section; if the mode was not already enabled,
> > + * enables it and calls arch_enter_lazy_mmu_mode_for_pte_range().
> > + *
> > + * PTEs that fall within the specified range might observe update speedups.
> > + * The PTE range must belong to the specified memory space and not cross
> > + * a page table boundary.
>
> Does that mean that all PTEs mapping [addr, end) must belong to the same
> PTE page? I think the wording should be more specific.

I tried to state that end of the range must not exceed pmd_addr_end(addr, end).
Any of these sounds better?

The PTE range must belong to the specified memory space and ...
a) the address range must not cross the parent PMD address range boundary
b) the PTEs must belong to the same parent PMD

> LGTM otherwise:
>
> Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>

Thanks!