Re: [PATCH v3] mm/page_vma_mapped_walk: Use ptep_get_lockless() for lockless access
From: Lorenzo Stoakes
Date: Mon Jun 01 2026 - 05:39:05 EST
On Thu, May 28, 2026 at 04:30:36PM +0200, Alexander Gordeev wrote:
> On Thu, May 28, 2026 at 04:14:03PM +0200, Oscar Salvador (SUSE) wrote:
> > On Thu, May 28, 2026 at 12:24:35PM +0100, Lorenzo Stoakes wrote:
> > > On Thu, May 28, 2026 at 09:55:07AM +0200, Alexander Gordeev wrote:
> > > > Switch from ptep_get() to ptep_get_lockless() accessor for
> > > > PTE reads when no lock is taken.
> > >
> > > This is an insufficient commit message that's just saying what you're doing,
> > > which isn't very useful.
> > >
> > > Please explain why you're doing this and what the benefit is please.
> >
> > Maybe something like
> >
> > "When not holding the lock, there is a chance that the pte gets modified
> > under our feet, so we need to use the lockless API to make sure that
> > the entries remain consistent during the read."
>
> I would gladly use this, if it makes sense for everyone.
>
> @Lorenzo?
Sounds good to me! Thanks
>
> > Only arm64 makes use of it though, due to the contpte stuff and being
> > unable to do it atomically.
>
> Thanks!
>
> > --
> > Oscar Salvador
> > SUSE Labs
Cheers, Lorenzo