mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-perf-users@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf/events: replace READ_ONCE() with standard page table accessors
Date: Mon, 6 Oct 2025 10:48:27 +0200	[thread overview]
Message-ID: <20251006084827.GR3245006@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <fa89fa8b-f5dd-4e01-a079-9b414efac30d@arm.com>

On Mon, Oct 06, 2025 at 02:10:14PM +0530, Anshuman Khandual wrote:

> These accessors provide platforms the opportunity to override and have different
> implementations other than READ_ONCE() when required.

When would this be required? Traditionally the only case that was weird
was Alpha, since it needed the dereference barrier, but since we folded
that into READ_ONCE(), that has all gone away.

[ also, historically we trusted GCC to emit singe loads for word sized
accesses -- something we've walked back from as C compilers have started
to be more agressive ]

Anyway, READ_ONCE() is the only sane way to dereference a page-table
pointers, doubly so in the face of lockless access.

There should be no need for architectures to be 'funny' here.

      reply	other threads:[~2025-10-06  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06  4:26 Anshuman Khandual
2025-10-06  8:22 ` Peter Zijlstra
2025-10-06  8:40   ` Anshuman Khandual
2025-10-06  8:48     ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251006084827.GR3245006@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=anshuman.khandual@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®