Re: [PATCH 01/31] mm: use pmdp_get_lockless() without surplus barrier()

From: Yu Zhao
Date: Wed May 24 2023 - 18:55:41 EST


On Sun, May 21, 2023 at 10:49 PM Hugh Dickins <hughd@xxxxxxxxxx> wrote:
>
> Use pmdp_get_lockless() in preference to READ_ONCE(*pmdp), to get a more
> reliable result with PAE (or READ_ONCE as before without PAE); and remove
> the unnecessary extra barrier()s which got left behind in its callers.
>
> HOWEVER: Note the small print in linux/pgtable.h, where it was designed
> specifically for fast GUP, and depends on interrupts being disabled for
> its full guarantee: most callers which have been added (here and before)
> do NOT have interrupts disabled, so there is still some need for caution.
>
> Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>

Acked-by: Yu Zhao <yuzhao@xxxxxxxxxx>

The previous ask here:
https://lore.kernel.org/r/CAOUHufZo=fB2HcaCrj2aidLJ2zEhOpi7ou5M_7qOQiuQq8+wTQ@xxxxxxxxxxxxxx/