public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* perf: rdpmc bug when viewing all procs on remote cpu
@ 2019-01-10 17:35 Vince Weaver
  2019-01-10 17:50 ` Vince Weaver
  0 siblings, 1 reply; 9+ messages in thread
From: Vince Weaver @ 2019-01-10 17:35 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-kernel, Ingo Molnar, Arnaldo Carvalho de Melo

Hello

I think this is a bug turned up by PAPI.  I've been trying to track down 
where this happens in the perf_event code myself, but it might be faster 
to just report it.

If you create a per-process attached to CPU event:
	perf_event_open(attr, 0, X, -1, 0);
the mmap event index is set to "0" (not available) on all cores but the
current one so the rdpmc read code can properly fall back to read().

However if you create an all-process attached to CPU event:
	perf_event_open(attr, -1, X, -1, 0);
the mmap event index is set as if this were a valid event and so the rdpmc
succeeds even though it shouldn't (we're trying to read an event value
on a remote cpu with a local rdpmc).

so I think somehow in the perf_event_open pid=-1 case rdpmc is not getting 
blocked properly...

Vince


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

end of thread, other threads:[~2019-01-18 20:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-10 17:35 perf: rdpmc bug when viewing all procs on remote cpu Vince Weaver
2019-01-10 17:50 ` Vince Weaver
2019-01-10 20:00   ` Vince Weaver
2019-01-11 21:52     ` Vince Weaver
2019-01-18 12:01       ` Peter Zijlstra
2019-01-18 14:09         ` Vince Weaver
2019-01-18 15:58           ` Peter Zijlstra
2019-01-18 17:24             ` Vince Weaver
2019-01-18 20:10               ` Peter Zijlstra

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