linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Lack of aarch64 checks for perf events schedulability
@ 2016-05-13 15:33 William Cohen
  2016-05-13 17:58 ` [Perfapi-devel] " Vince Weaver
  0 siblings, 1 reply; 5+ messages in thread
From: William Cohen @ 2016-05-13 15:33 UTC (permalink / raw)
  To: linux-perf-users, PAPI Developers, Michael Petlan

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

Hi,

When running the PAPI testsuite on RHEL for aarch64 Michael Petlan
found that the test overflow_allcounters was failing.  I investigated
and it looks like the the RHEL for aarch64 linux kernel perf support
suffers from a problem similar to MIPS kernels where perf_event_open
doesn't properly check that events can be scheduled together; then a
later read of the counters will fail.  This has been observed on the
RHEL for aarch64 4.5.0 based kernel. I have not tried this on the
latest kernel, so I don't know if this is still a problem with newer
kernels.

As a workaround papi's check for MIPS can be expanded for aarch64 as
the attached patch.  However, it would be better if the
perf_event_open schedule checks worked properly for aarch64.

-Will Cohen


[-- Attachment #2: papi_sched_aarch64.patch --]
[-- Type: text/x-patch, Size: 743 bytes --]

diff -up papi-5.2.0/src/components/perf_event/perf_event.c.sched_aarch64 papi-5.2.0/src/components/perf_event/perf_event.c
--- papi-5.2.0/src/components/perf_event/perf_event.c.sched_aarch64	2016-05-13 11:07:29.509101953 -0400
+++ papi-5.2.0/src/components/perf_event/perf_event.c	2016-05-13 11:08:16.520550544 -0400
@@ -159,8 +159,8 @@ bug_check_scheduability(void) {
 
 #if defined(__powerpc__)
   /* PowerPC not affected by this bug */
-#elif defined(__mips__)
-  /* MIPS as of kernel 3.1 does not properly detect schedulability */
+#elif defined(__mips__) || defined(__aarch64__)
+  /* MIPS and aarch64 kernels do not properly detect schedulability */
   return 1;
 #else
   if (_papi_os_info.os_version < LINUX_VERSION(2,6,33)) return 1;

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

end of thread, other threads:[~2016-05-14  0:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 15:33 Lack of aarch64 checks for perf events schedulability William Cohen
2016-05-13 17:58 ` [Perfapi-devel] " Vince Weaver
2016-05-13 18:28   ` William Cohen
2016-05-13 19:02     ` Vince Weaver
2016-05-14  0:22       ` William Cohen

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).