linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm_pmu: fix fallout from context handling rewrite
@ 2023-02-16 14:12 Mark Rutland
  2023-02-16 14:12 ` [PATCH 1/2] arm_pmu: fix event CPU filtering Mark Rutland
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mark Rutland @ 2023-02-16 14:12 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: asahi, ecurtin, j, lina, linux-kernel, mark.rutland, peterz,
	ravi.bangoria, will

Janne reports [1] that perf has been broken on Apple M1 as of commit:

  bd27568117664b8b ("perf: Rewrite core context handling")

This is due to changes to pmu::filter_match() and
arm_pmu::filter_match(), which have been renamed and had their polarity
inverted, but the conversion was inconsistent, and so in some cases we
return the opposite result relative to what we had intended. This
results in consistently losing events on Apple M1.

That commit also (silently) removed the filtering of CHAIN events, which
is undesireable.

These patches fix and simplify the CPU filtering, and replace the CHAIN
event filtering with early rejection of CHAIN events, which is much
simpler.

Thanks,
Mark

[1] https://lore.kernel.org/asahi/20230215-arm_pmu_m1_regression-v1-1-f5a266577c8d@jannau.net/

Mark Rutland (2):
  arm_pmu: fix event CPU filtering
  arm64: perf: reject CHAIN events at creation time

 arch/arm64/kernel/perf_event.c | 15 ++++++++-------
 drivers/perf/arm_pmu.c         |  8 +-------
 include/linux/perf/arm_pmu.h   |  1 -
 3 files changed, 9 insertions(+), 15 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-16 22:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 14:12 [PATCH 0/2] arm_pmu: fix fallout from context handling rewrite Mark Rutland
2023-02-16 14:12 ` [PATCH 1/2] arm_pmu: fix event CPU filtering Mark Rutland
2023-02-16 14:35   ` Janne Grunau
2023-02-16 15:13     ` Mark Rutland
2023-02-16 15:17       ` Will Deacon
2023-02-16 14:12 ` [PATCH 2/2] arm64: perf: reject CHAIN events at creation time Mark Rutland
2023-02-16 22:14 ` [PATCH 0/2] arm_pmu: fix fallout from context handling rewrite Will Deacon

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