public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* perf: is it possible to userspace rdpmc but only on a certain core type
@ 2025-01-17 22:04 Vince Weaver
  2025-01-20 16:44 ` Liang, Kan
  0 siblings, 1 reply; 8+ messages in thread
From: Vince Weaver @ 2025-01-17 22:04 UTC (permalink / raw)
  To: peterz
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Liang, Kan,
	linux-kernel

Hello

so we've been working on PAPI support for Intel Top-Down events, which
let's say does "exciting" things involving the rdpmc instruction.

One issue we are having is that on a hybrid machine (Raptor Lake in this 
case with performance/efficiency cores) there is no top-down support
for the E-cores, and it will gpf/segfault if you try to rdpmc the top-down 
events.

Obviously PAPI would like to avoid this, and somehow only run the rdpmc 
from userspace if scheduled on a P-core.

Is there any way to atomically do this?  Somehow detect what core we are 
on and atomically execute a userspace instruction before a core-reschedule 
can happen?

Or barring that, any other way to handle this in a way that won't crash 
without having to have the users have to bind to a core any time they want 
to run PAPI?

Thanks

Vince Weaver
vincent.weaver@maine.edu

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-24  5:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 22:04 perf: is it possible to userspace rdpmc but only on a certain core type Vince Weaver
2025-01-20 16:44 ` Liang, Kan
2025-01-21 12:52   ` Peter Zijlstra
2025-01-21 14:30     ` Mathieu Desnoyers
2025-01-22 21:51     ` Vince Weaver
2025-01-23 18:14       ` Andi Kleen
2025-01-23 19:45         ` Vince Weaver
2025-01-24  5:18           ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox