Re: [PATCH] perf/events: Replace READ_ONCE() with standard pgtable accessors

From: David Laight

Date: Wed Apr 08 2026 - 08:53:19 EST


On Tue, 7 Apr 2026 08:58:46 +0530
Anshuman Khandual <anshuman.khandual@xxxxxxx> wrote:

> On 27/02/26 11:57 AM, Anshuman Khandual wrote:
> > Replace raw READ_ONCE() dereferences of pgtable entries with corresponding
> > standard page table accessors pxdp_get() in perf_get_pgtable_size(). These
> > accessors default to READ_ONCE() on platforms that don't override them. So
> > there is no functional change on such platforms.
> >
> > However arm64 platform is being extended to support 128 bit page tables via
> > a new architecture feature i.e FEAT_D128 in which case READ_ONCE() will not
> > provide required single copy atomic access for 128 bit page table entries.
> > Although pxdp_get() accessors can later be overridden on arm64 platform to
> > extend required single copy atomicity support on 128 bit entries.
>

Did you consider enhancing READ_ONCE() to support 128bit accesses on arm64?

David