Re: [PATCH] mm/page_vma_mapped_walk: add missing pgtable entry accessors

Oscar Salvador
2026-04-27T08:40:17Z

On Mon, Apr 27, 2026 at 07:20:00AM +0200, Alexander Gordeev wrote:
> Convert pgtable direct entry dereferences to the corresponding
> pXdp_get() accessors. Use ptep_get_lockless() variant for PTE
> reads when no lock is taken.
>
> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
> ---
> mm/page_vma_mapped.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
> index b38a1d00c971..a4520bb10d2a 100644
> --- a/mm/page_vma_mapped.c
> +++ b/mm/page_vma_mapped.c
...
> @@ -317,7 +317,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
> goto restart;
> }
> pvmw->pte++;
> - } while (pte_none(ptep_get(pvmw->pte)));
> + } while (pte_none(ptep_get_lockless(pvmw->pte)));

map_pte() might take the lock if PVWN_SYNC mode, or am I missing something?

--
Oscar Salvador
SUSE Labs