From: Leo Yan <leo.yan@arm.com>
To: kan.liang@linux.intel.com
Cc: 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,
eranian@google.com, ctshao@google.com, tmricht@linux.ibm.com,
Rob Herring <robh@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Will Deacon <will@kernel.org>
Subject: Re: [PATCH V2 07/15] perf/arm: Remove driver-specific throttle support
Date: Fri, 16 May 2025 14:24:12 +0100 [thread overview]
Message-ID: <20250516132412.GF412060@e132581.arm.com> (raw)
In-Reply-To: <20250514151401.2547932-8-kan.liang@linux.intel.com>
On Wed, May 14, 2025 at 08:13:53AM -0700, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
>
> The throttle support has been added in the generic code. Remove
> the driver-specific throttle support.
>
> Besides the throttle, perf_event_overflow may return true because of
> event_limit. It already does an inatomic event disable. The pmu->stop
> is not required either.
>
> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Rob Herring (Arm) <robh@kernel.org>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Cc: Will Deacon <will@kernel.org>
> ---
> 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 ++----
> 4 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
> index e506d59654e7..3db9f4ed17e8 100644
> --- a/drivers/perf/arm_pmuv3.c
> +++ b/drivers/perf/arm_pmuv3.c
> @@ -887,8 +887,7 @@ static irqreturn_t armv8pmu_handle_irq(struct arm_pmu *cpu_pmu)
> * an irq_work which will be taken care of in the handling of
> * IPI_IRQ_WORK.
> */
> - if (perf_event_overflow(event, &data, regs))
> - cpu_pmu->disable(event);
> + perf_event_overflow(event, &data, regs);
I did a test for Arm PMUv3, sometimes I can get consistent result
crossing events, but I still saw discrepancy in some runs:
# perf record -c 400 -C 4,5,6,7 -e "{cycles,cycles}:S" -- sleep 5
# perf report -D | grep PERF_RECORD_SAMPLE -a4 | tail -n 5
7 5691046123610 0x63670 [0x68]: PERF_RECORD_SAMPLE(IP, 0x1): 0/0:
0xffff80008137a6d0 period: 400 addr: 0
... sample_read:
.... group nr 2
..... id 00000000000000bf, value 000000000019d7a7, lost 0
..... id 00000000000000c3, value 000000000019d3f9, lost 0
Though it does not dismiss discrepancy totally (maybe it depends on
hardware mechanism), I do see this series can mitigate the issue
significantly.
Tested-by: Leo Yan <leo.yan@arm.com>
next prev parent reply other threads:[~2025-05-16 13:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 15:13 [PATCH V2 00/15] perf: Fix the throttle logic for group kan.liang
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 [this message]
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=20250516132412.GF412060@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=ctshao@google.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=kan.liang@linux.intel.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=robh@kernel.org \
--cc=tmricht@linux.ibm.com \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).