From: kan.liang@linux.intel.com
To: peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org,
irogers@google.com, mark.rutland@arm.com,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Cc: eranian@google.com, ctshao@google.com, tmricht@linux.ibm.com,
Kan Liang <kan.liang@linux.intel.com>
Subject: [PATCH V2 00/15] perf: Fix the throttle logic for group
Date: Wed, 14 May 2025 08:13:46 -0700 [thread overview]
Message-ID: <20250514151401.2547932-1-kan.liang@linux.intel.com> (raw)
From: Kan Liang <kan.liang@linux.intel.com>
Changes since V1:
- Apply the suggested throttle/unthrottle functions from Peter.
The MAX_INTERRUPTS and throttle logs are applied to all events.
- Update the description and comments accordingly
- Add Reviewed-by from Ravi and Max
The sampling read doesn't work well with a group.
The issue was originally found by the 'Basic leader sampling test' case
failed on s390.
https://lore.kernel.org/all/20250228062241.303309-1-tmricht@linux.ibm.com/
Stephane debugged it and found it was caused by the throttling logic.
https://lore.kernel.org/all/CABPqkBQzCMNS_PfLZBWVuX9o8Z55PovwJvpVWMWzyeExFJ5R4Q@mail.gmail.com/
The throttle logic is generic and shared by all ARCHs.
It also impacts other ARCHs, e.g., X86.
On an Intel GNR machine,
$ perf record -e "{cycles,cycles}:S" ...
$ perf report -D | grep THROTTLE | tail -2
THROTTLE events: 426 ( 9.0%)
UNTHROTTLE events: 425 ( 9.0%)
$ perf report -D | grep PERF_RECORD_SAMPLE -a4 | tail -n 5
0 1020120874009167 0x74970 [0x68]: PERF_RECORD_SAMPLE(IP, 0x1):
... sample_read:
.... group nr 2
..... id 0000000000000327, value 000000000cbb993a, lost 0
..... id 0000000000000328, value 00000002211c26df, lost 0
The patch set tries to provide a generic fix for the group throttle
support. So the buggy driver-specific implementation can be removed.
The patch set is only verified on newer Intel platforms.
Kan Liang (15):
perf: Fix the throttle logic for a group
perf/x86/intel: Remove driver-specific throttle support
perf/x86/amd: Remove driver-specific throttle support
perf/x86/zhaoxin: Remove driver-specific throttle support
powerpc/perf: Remove driver-specific throttle support
s390/perf: Remove driver-specific throttle support
perf/arm: Remove driver-specific throttle support
perf/apple_m1: Remove driver-specific throttle support
alpha/perf: Remove driver-specific throttle support
arc/perf: Remove driver-specific throttle support
csky/perf: Remove driver-specific throttle support
loongarch/perf: Remove driver-specific throttle support
sparc/perf: Remove driver-specific throttle support
xtensa/perf: Remove driver-specific throttle support
mips/perf: Remove driver-specific throttle support
arch/alpha/kernel/perf_event.c | 11 ++----
arch/arc/kernel/perf_event.c | 6 +--
arch/csky/kernel/perf_event.c | 3 +-
arch/loongarch/kernel/perf_event.c | 3 +-
arch/mips/kernel/perf_event_mipsxx.c | 3 +-
arch/powerpc/perf/core-book3s.c | 6 +--
arch/powerpc/perf/core-fsl-emb.c | 3 +-
arch/s390/kernel/perf_cpum_cf.c | 2 -
arch/s390/kernel/perf_cpum_sf.c | 5 +--
arch/sparc/kernel/perf_event.c | 3 +-
arch/x86/events/amd/core.c | 3 +-
arch/x86/events/amd/ibs.c | 4 +-
arch/x86/events/core.c | 3 +-
arch/x86/events/intel/core.c | 6 +--
arch/x86/events/intel/ds.c | 7 ++--
arch/x86/events/intel/knc.c | 3 +-
arch/x86/events/intel/p4.c | 3 +-
arch/x86/events/zhaoxin/core.c | 3 +-
arch/xtensa/kernel/perf_event.c | 3 +-
drivers/perf/apple_m1_cpu_pmu.c | 3 +-
drivers/perf/arm_pmuv3.c | 3 +-
drivers/perf/arm_v6_pmu.c | 3 +-
drivers/perf/arm_v7_pmu.c | 3 +-
drivers/perf/arm_xscale_pmu.c | 6 +--
kernel/events/core.c | 58 +++++++++++++++++++++-------
25 files changed, 75 insertions(+), 81 deletions(-)
--
2.38.1
next reply other threads:[~2025-05-14 15:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 15:13 kan.liang [this message]
2025-05-14 15:13 ` [PATCH V2 01/15] perf: Fix the throttle logic for a group kan.liang
2025-05-15 9:43 ` Leo Yan
2025-05-15 12:55 ` Liang, Kan
2025-05-16 12:51 ` Leo Yan
2025-05-16 13:28 ` Liang, Kan
2025-05-16 14:17 ` Leo Yan
2025-05-16 14:33 ` Liang, Kan
2025-05-14 15:13 ` [PATCH V2 02/15] perf/x86/intel: Remove driver-specific throttle support kan.liang
2025-05-14 15:13 ` [PATCH V2 03/15] perf/x86/amd: " kan.liang
2025-05-14 15:13 ` [PATCH V2 04/15] perf/x86/zhaoxin: " kan.liang
2025-05-14 15:13 ` [PATCH V2 05/15] powerpc/perf: " kan.liang
2025-05-14 15:13 ` [PATCH V2 06/15] s390/perf: " kan.liang
2025-05-15 13:15 ` Thomas Richter
2025-05-15 13:56 ` Liang, Kan
2025-05-14 15:13 ` [PATCH V2 07/15] perf/arm: " kan.liang
2025-05-16 13:24 ` Leo Yan
2025-05-14 15:13 ` [PATCH V2 08/15] perf/apple_m1: " kan.liang
2025-05-14 15:13 ` [PATCH V2 09/15] alpha/perf: " kan.liang
2025-05-14 15:13 ` [PATCH V2 10/15] arc/perf: " kan.liang
2025-05-14 15:13 ` [PATCH V2 11/15] csky/perf: " kan.liang
2025-05-15 6:34 ` Guo Ren
2025-05-14 15:13 ` [PATCH V2 12/15] loongarch/perf: " kan.liang
2025-05-14 15:13 ` [PATCH V2 13/15] sparc/perf: " kan.liang
2025-05-14 15:14 ` [PATCH V2 14/15] xtensa/perf: " kan.liang
2025-05-14 15:14 ` [PATCH V2 15/15] mips/perf: " kan.liang
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=20250514151401.2547932-1-kan.liang@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=ctshao@google.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tmricht@linux.ibm.com \
/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
all inboxes | Powered by JetHome®