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: [RFC PATCH 00/15] perf: Fix the throttle logic for group
Date: Tue, 6 May 2025 09:47:25 -0700 [thread overview]
Message-ID: <20250506164740.1317237-1-kan.liang@linux.intel.com> (raw)
From: Kan Liang <kan.liang@linux.intel.com>
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 | 55 +++++++++++++++++++++-------
25 files changed, 72 insertions(+), 81 deletions(-)
--
2.38.1
next reply other threads:[~2025-05-06 16:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 16:47 kan.liang [this message]
2025-05-06 16:47 ` [RFC PATCH 01/15] perf: Fix the throttle logic for a group kan.liang
2025-05-07 16:52 ` Ian Rogers
2025-05-07 19:00 ` Liang, Kan
2025-05-13 9:41 ` Peter Zijlstra
2025-05-13 9:45 ` Peter Zijlstra
2025-05-13 14:47 ` Liang, Kan
2025-05-06 16:47 ` [RFC PATCH 02/15] perf/x86/intel: Remove driver-specific throttle support kan.liang
2025-05-06 16:47 ` [RFC PATCH 03/15] perf/x86/amd: " kan.liang
2025-05-13 8:44 ` Ravi Bangoria
2025-05-06 16:47 ` [RFC PATCH 04/15] perf/x86/zhaoxin: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 05/15] powerpc/perf: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 06/15] s390/perf: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 07/15] perf/arm: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 08/15] perf/apple_m1: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 09/15] alpha/perf: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 10/15] arc/perf: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 11/15] csky/perf: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 12/15] loongarch/perf: " kan.liang
2025-05-07 1:17 ` 陈华才
2025-05-07 13:45 ` Liang, Kan
2025-05-06 16:47 ` [RFC PATCH 13/15] sparc/perf: " kan.liang
2025-05-06 16:47 ` [RFC PATCH 14/15] xtensa/perf: " kan.liang
2025-05-11 20:43 ` Max Filippov
2025-05-06 16:47 ` [RFC PATCH 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=20250506164740.1317237-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.