Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "James Clark" <james.clark@linaro.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf test: Fix race in "Event re-armed with PERF_EVENT_IOC_REFRESH"
Date: Mon, 23 Nov 2026 15:38:24 +0000	[thread overview]
Message-ID: <sashiko-outbox-229587@kernel.org> (raw)
In-Reply-To: <20261123-james-perf-event_refresh-v1-1-571efa5395ab@linaro.org>

> trigger() is invoked without blocking, but the test expects N events to
> always be received for N triggers. After each trigger, the event is
> disabled and only re-enabled by the signal handler. If the next trigger
> happens before the event is re-enabled, then an event count will be
> dropped. This is possible because signals are delivered asynchronously.
> Fix it by blocking signals then unblocking while waiting for the event
> after each call to trigger().
> 
> Blocking results in a 1:1 relation between trigger and signal counts,
> even when there are extra page faults, so remove the comment and change
> >= to == on the final test assert.
> 
> Timeout after 2 seconds because we already know there are broken kernels
> for the tracepoint test, and the default 120s timeout would be annoying.
> 
> This fixes the following failure seen on Arm64:
> 
>   $ perf test -vv -r 30000 -S "Event re-armed"
>   ...
> 
>   ---- start ----
>   test child forked, pid 1087
>   1000 events, count 999, 999 overflows (999 POLL_HUP), re-arm errno 0
>   ---- end(-1) ----
>    20.1: Software event                   : FAILED!
> 
> Fixes: 3dabc8ad8ae0 ("perf test: Add test for events re-armed with PERF_EVENT_IOC_REFRESH")
> Signed-off-by: James Clark <james.clark@linaro.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-james-perf-event_refresh-v1-1-571efa5395ab@linaro.org?part=1

      reply	other threads:[~2026-11-23 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 15:34 [PATCH] perf test: Fix race in "Event re-armed with PERF_EVENT_IOC_REFRESH" James Clark
2026-11-23 15:38 ` sashiko-bot [this message]

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=sashiko-outbox-229587@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=james.clark@linaro.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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