public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 0/3] perf_event_open02 tweaks
Date: Mon, 18 Nov 2019 15:59:54 +0100	[thread overview]
Message-ID: <cover.1574087532.git.jstancek@redhat.com> (raw)

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

-- 
1.8.3.1


             reply	other threads:[~2019-11-18 14:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 14:59 Jan Stancek [this message]
2019-11-18 14:59 ` [LTP] [PATCH 1/3] perf_event_open02: migrate to newlib Jan Stancek
2019-11-20 12:29   ` Cyril Hrubis
2019-11-21  8:45     ` Jan Stancek
2019-11-18 14:59 ` [LTP] [PATCH 2/3] perf_event_open02: make do_work() run for specified time Jan Stancek
2019-11-20 12:33   ` Cyril Hrubis
2019-11-21  8:48     ` Jan Stancek
2019-11-21 19:21   ` [LTP] [PATCH v2 " Jan Stancek
2019-11-22 13:33     ` Cyril Hrubis
2019-11-25 14:54       ` Jan Stancek
2019-11-18 14:59 ` [LTP] [PATCH 3/3] perf_event_open02: workaround for Pentium4 Jan Stancek
2019-11-20 13:44   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1574087532.git.jstancek@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox