[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <79462dc8-6f90-0d0b-1374-ac5123aa0f45@maine.edu>
Date: Wed, 22 Jan 2025 16:51:28 -0500 (EST)
From: Vince Weaver <vincent.weaver@...ne.edu>
To: Peter Zijlstra <peterz@...radead.org>
cc: "Liang, Kan" <kan.liang@...ux.intel.com>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
mathieu.desnoyers@...icios.com
Subject: Re: perf: is it possible to userspace rdpmc but only on a certain
core type
On Tue, 21 Jan 2025, Peter Zijlstra wrote:
> That's not race-free, the task can get migrated to an E core the moment
> after you done the load and before the rdpmc instruction.
>
> I suppose you can wrap the whole thing in RSEQ though, it's a bit of a
> pain, but RSEQ can be configured to abort on migration.
>
> The very latest libc (2.35+) should have rseq registered by default,
> older will have to do so itself -- there is example code in
> tools/testing/selftests/rseq but also
> https://git.kernel.org/pub/scm/libs/librseq/librseq.git
thanks, I had forgotten all about RSEQ, it's more or less exactly what we
were looking for.
I have a student working on this for PAPI. If we get it working we can
see if perf could use support too if it doesn't have it already.
Vince Weaver
vincent.weaver@...ne.edu
Powered by blists - more mailing lists