mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tanushree Shah <tshah@linux.ibm.com>
To: Matt Turner <mattst88@gmail.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	Paul Mackerras <paulus@ozlabs.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/8] powerpc/perf: mpc7450: Event 0x634 counts L2 prefetches, not L1I
Date: Tue, 17 Nov 2026 20:55:16 +0530	[thread overview]
Message-ID: <0cba99b3-a70e-47d4-8907-a2766e96e5e9@linux.ibm.com> (raw)
In-Reply-To: <20261109-ppc32-perf-v1-2-a6e8a55b3b48@gmail.com>


On 11/10/26 7:17 AM, Matt Turner wrote:
> The cache event table maps L1-icache-prefetches to 0x634, PMC6 select
> 52.  The manual (MPC7450UM Rev. 5, Table 11-14) calls that event
> "Prefetch engine request" and says it "counts new prefetches allocated
> in the prefetch unit".  It is the first of six events about the L2
> prefetch engine (selects 52-57), and the MPC7450 has no instruction
> cache prefetch event.
>
> On a 7448, a pointer chase over 64-byte nodes counts r634 at 0.00 per
> load when the working set fits in the 1 MB L2, and at 1.00 per load,
> one per L2 demand miss, at 4 MB.
>
> The engine starts a prefetch only when an access misses in every cache,
> fetches from the bus, and also fills the L3 if there is one (section
> 3.6.3.2), so it is a last-level prefetch with or without an L3.  Report
> it as LL-prefetches, and L1-icache-prefetches as not supported.
>
> Fixes: 7325927e5a20 ("perf_counter: powerpc: Add processor back-end for MPC7450 family")
> Signed-off-by: Matt Turner <mattst88@gmail.com>
Hi Matt,

I have checked Table 11-14 in the manual: PMC6 select 52 (0x634) is
"Prefetch engine request", the first of the prefetch engine events,
and there is no instruction cache prefetch event in the tables. Moving
0x634 from L1-icache-prefetches to LL-prefetches matches that.

Reviewed-by: Tanushree Shah <tshah@linux.ibm.com>


Thanks
Tanushree Shah

> ---
>   arch/powerpc/perf/mpc7450-pmu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/perf/mpc7450-pmu.c b/arch/powerpc/perf/mpc7450-pmu.c
> index 564f6dac3a00..5a882d934645 100644
> --- a/arch/powerpc/perf/mpc7450-pmu.c
> +++ b/arch/powerpc/perf/mpc7450-pmu.c
> @@ -370,12 +370,12 @@ static u64 mpc7450_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
>   	[C(L1I)] = {		/* 	RESULT_ACCESS	RESULT_MISS */
>   		[C(OP_READ)] = {	0x129,		0x115	},
>   		[C(OP_WRITE)] = {	-1,		-1	},
> -		[C(OP_PREFETCH)] = {	0x634,		0	},
> +		[C(OP_PREFETCH)] = {	0,		0	},
>   	},
>   	[C(LL)] = {		/* 	RESULT_ACCESS	RESULT_MISS */
>   		[C(OP_READ)] = {	0,		0	},
>   		[C(OP_WRITE)] = {	0,		0	},
> -		[C(OP_PREFETCH)] = {	0,		0	},
> +		[C(OP_PREFETCH)] = {	0x634,		0	},
>   	},
>   	[C(DTLB)] = {		/* 	RESULT_ACCESS	RESULT_MISS */
>   		[C(OP_READ)] = {	0,		0x312	},
>

  reply	other threads:[~2026-11-17 15:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  1:46 [PATCH 0/8] powerpc/perf: mpc7450: Event fixes, SIAR sampling and sysfs event names Matt Turner
2026-11-10  1:47 ` [PATCH 1/8] powerpc/perf: mpc7450: Event 0x30d does not use the threshold Matt Turner
2026-11-13 17:38   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 2/8] powerpc/perf: mpc7450: Event 0x634 counts L2 prefetches, not L1I Matt Turner
2026-11-17 15:25   ` Tanushree Shah [this message]
2026-11-10  1:47 ` [PATCH 3/8] powerpc/perf: mpc7450: Remove the snoop retry alternatives Matt Turner
2026-11-17 15:28   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 4/8] powerpc/perf: mpc7450: Fill in the L1 data cache events Matt Turner
2026-11-17 15:36   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 5/8] powerpc/perf: mpc7450: Add the PMC6 L3 events to the alternatives table Matt Turner
2026-11-17 15:39   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 6/8] powerpc/perf: mpc7450: Export the event format in sysfs Matt Turner
2026-11-10  1:47 ` [PATCH 7/8] powerpc/perf: Use SIAR for sample addresses on 32-bit Matt Turner
2026-11-17 16:11   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 8/8] powerpc/perf: mpc7450: Export event names in sysfs Matt Turner
2026-11-17 16:17   ` Tanushree Shah
2026-11-10  1:55 ` [PATCH 0/8] powerpc/perf: mpc7450: Event fixes, SIAR sampling and sysfs event names Matt Turner

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=0cba99b3-a70e-47d4-8907-a2766e96e5e9@linux.ibm.com \
    --to=tshah@linux.ibm.com \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mattst88@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@ozlabs.org \
    --cc=ritesh.list@gmail.com \
    --cc=sshegde@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®