Re: [RFC PATCH 1/2] mm: make lazy MMU mode context-aware

From: Kevin Brodsky

Date: Tue Apr 14 2026 - 10:33:31 EST


On 14/04/2026 09:53, Alexander Gordeev wrote:
> /**
> * lazy_mmu_mode_enable_for_pte_range() - Enable the lazy MMU mode with a speedup hint.
> * @mm: Address space the ptes represent.

Not sure that makes sense, maybe something like "Address space the PTEs
belong to"?

> * @addr: Address of the first pte.

Isn't it the address of the underlying memory rather?

> * @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 do not cross

s/do not/not/

> * a page table boundary.
> *
> * There are no requirements on the order or range completeness of PTE
> * updates for the specified range.
> *
> * Must be paired with a call to lazy_mmu_mode_disable().
> *
> * Has no effect if called:
> * - While paused - see lazy_mmu_mode_pause()
> * - In interrupt context
> */

Looks reasonable to me otherwise.

- Kevin