Skip to content

perf_event_open02 tweaks

Jan Stancek ltp 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3perf_event_open02: migrate to newlibtestcases/kernel/syscalls/perf_event_open/perf_event_open02.c+132 -2241 reply
1/3perf_event_open02: migrate to newlib+0 -00 replies
2/3perf_event_open02: make do_work() run for specified timetestcases/kernel/syscalls/perf_event_open/perf_event_open02.c+29 -74 replies
2/3perf_event_open02: make do_work() run for specified time+0 -00 replies
3/3perf_event_open02: workaround for Pentium4testcases/kernel/syscalls/perf_event_open/perf_event_open02.c+13 -91 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [LTP] [PATCH 0/3] perf_event_open02 tweaks

Motivation for this series is patch 3, because this test fails pretty reliably on Pentium4 systems.

I talked to Jiri Olsa (one of perf maintainers) and he had his reservations about how test determines number of HW counters - by looking at time_enabled/time_running. One idea was to create a single group and keep adding hw events to it until it fails. This however didn't work on Pentium4 system either and it failed on 2nd event. He also pointed out, that test will always succeed when number of hw counter is over-estimated.

I found one workaround, which seems to work on both Pentium4 and more recent CPUs. It replaces comparison of absolute values with comparison of increments (see patch 3 for details).

Question about validity of this test remains, but workaround in patch 3 at least should not make things worse.

Jan Stancek (3):
perf_event_open02: migrate to newlib
perf_event_open02: make do_work() run for specified time
perf_event_open02: workaround for Pentium4

 .../syscalls/perf_event_open/perf_event_open02.c   | 402 +++++++++------------
 1 file changed, 168 insertions(+), 234 deletions(-)
Signature · 1 line
1.8.3.1