linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf_event: avoiding gpf on rdpmc for top-down-events on hybrid
@ 2024-12-04 21:20 Vince Weaver
  2024-12-05  0:57 ` Ian Rogers
  0 siblings, 1 reply; 11+ messages in thread
From: Vince Weaver @ 2024-12-04 21:20 UTC (permalink / raw)
  To: linux-perf-users; +Cc: Peter Zijlstra

Hello

so the PAPI team is working on trying to get Intel top-down event support
working.

We ran into a problem where on hybrid machines (Alder/Raptor Lake) topdown 
events are only supported on P-cores but not E-cores.

So you have code that is happily using rdpmc to read the data on P-cores 
but if you have bad luck and get rescheduled to an E-core then the rdpmc 
instruction will segfault/gpf the whole program.

Is there any way, short of setting up a complex segfault signal handler, 
to avoid this happening?

In theory you could try to check what core type you are on before doing 
the rdpmc but there's a race there if you get rescheduled after the check 
but before the actual rdpmc instruction.

Vince Weaver
vincent.weaver@maine.edu

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

end of thread, other threads:[~2025-06-18 13:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 21:20 perf_event: avoiding gpf on rdpmc for top-down-events on hybrid Vince Weaver
2024-12-05  0:57 ` Ian Rogers
2025-06-15 23:23   ` Ian Rogers
2025-06-16 19:34     ` Vince Weaver
2025-06-17  4:36       ` Ian Rogers
2025-06-17 16:37         ` Ian Rogers
2025-06-17 18:17           ` Peter Zijlstra
2025-06-17 20:36             ` Ian Rogers
2025-06-18  8:45               ` Peter Zijlstra
2025-06-18 11:55                 ` Peter Zijlstra
2025-06-18 13:57                 ` Vince Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).