* [PATCH] perf test: Fix test 21 for s390x
@ 2017-11-24 9:43 Thomas Richter
0 siblings, 0 replies; only message in thread
From: Thomas Richter @ 2017-11-24 9:43 UTC (permalink / raw)
To: linux-kernel, linux-perf-users, acme
Cc: brueckner, schwidefsky, heiko.carstens, Thomas Richter
Test case 21 (Number of exit events of a simple workload) fails
on s390x. The reason is the invalid sample frequency supplied for
this test. On s390x the minimum sample frequency is much higher
(see output of /proc/service_levels:
[root@s35lp76 linux-devel]# cat /proc/service_levels
CPU-MF: Counter facility: version=3.5 authorization=002f
CPU-MF: Sampling facility: min_rate=18228 max_rate=170650536 cpu_speed=5208
...
[root@s35lp76 linux-devel]#
).
Supply a save sample frequency value for s390x to fix this.
The value will be adjusted by the s390x CPUMF frequency
convertion function to a value well below the
sysctl kernel.perf_event_max_sample_rate value.
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
tools/perf/tests/task-exit.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index bc4a7344e274..1073670dd1f2 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -84,7 +84,11 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
evsel = perf_evlist__first(evlist);
evsel->attr.task = 1;
+#ifdef __s390x__
+ evsel->attr.sample_freq = 1000000;
+#else
evsel->attr.sample_freq = 1;
+#endif
evsel->attr.inherit = 0;
evsel->attr.watermark = 0;
evsel->attr.wakeup_events = 1;
--
2.13.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-24 9:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24 9:43 [PATCH] perf test: Fix test 21 for s390x Thomas Richter
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).