[PATCH 0/2] perf: Revert direct PMU stop for refresh limit

From: Leo Yan

Date: Tue May 12 2026 - 11:47:20 EST


Commit 18dbcbfabfff ("perf: Fix the POLL_HUP delivery breakage") added a
direct pmu->stop() call when the refresh limit reaches zero. The change
was based on a test program [1] that reported missing POLL_HUP
notifications.

However, the test program used SIGIO, which is a standard signal and can
be coalesced. As a result, userspace may miss signal delivery even
though the signal was generated by the kernel. This is expected
behaviour for standard signals.

This series adds a selftest for the PERF_EVENT_IOC_REFRESH limit using a
real-time signal, which guarantees queued signal delivery and confirms
that POLL_HUP notifications are delivered reliably on arm64.

With that verified, the direct pmu->stop() call introduced by commit
18dbcbfabfff can be reverted, since event disabling is already handled
through perf_event_disable_inatomic().

[1] https://lore.kernel.org/lkml/aICYAqM5EQUlTqtX@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/

Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
---
Leo Yan (2):
selftests/perf_events: Add test for refresh limit signals
Revert "perf: Fix the POLL_HUP delivery breakage"

kernel/events/core.c | 1 -
tools/testing/selftests/perf_events/.gitignore | 1 +
tools/testing/selftests/perf_events/Makefile | 3 +-
.../testing/selftests/perf_events/refresh_signal.c | 120 +++++++++++++++++++++
4 files changed, 123 insertions(+), 2 deletions(-)
---
base-commit: 50897c955902c93ae71c38698abb910525ebdc89
change-id: 20260429-arm_cs_clean_perf_handle-763cc339c1f5

Best regards,
--
Leo Yan <leo.yan@xxxxxxx>