* [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB
@ 2025-10-31 16:26 Ian Rogers
2025-11-12 19:31 ` Ian Rogers
2025-12-10 5:39 ` Madhavan Srinivasan
0 siblings, 2 replies; 6+ messages in thread
From: Ian Rogers @ 2025-10-31 16:26 UTC (permalink / raw)
To: Athira Rajeev, Kajol Jain, Madhavan Srinivasan, Peter Zijlstra,
Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
linux-perf-users, linux-kernel
6.1e-5 is very close to 1/16384, where 16384 is 2^14, i.e. a power of
2. When units are in powers of 2 the IEC unit is MiB (mebibytes)
rather than MB (megabytes) where the values are powers of 10. This
patch corrects the unit for uniformity and because such units may be
pattern matched against.
Signed-off-by: Ian Rogers <irogers@google.com>
---
.../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
index 7a5d1bf543f8..8d028a7c2777 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
@@ -29,25 +29,25 @@
"MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
"MetricName" : "mcs01-read",
"MetricGroup" : "memory-bandwidth",
- "ScaleUnit": "6.1e-5MB"
+ "ScaleUnit": "6.1e-5MiB"
},
{
"MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
"MetricName" : "mcs23-read",
"MetricGroup" : "memory-bandwidth",
- "ScaleUnit": "6.1e-5MB"
+ "ScaleUnit": "6.1e-5MiB"
},
{
"MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
"MetricName" : "mcs01-write",
"MetricGroup" : "memory-bandwidth",
- "ScaleUnit": "6.1e-5MB"
+ "ScaleUnit": "6.1e-5MiB"
},
{
"MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
"MetricName" : "mcs23-write",
"MetricGroup" : "memory-bandwidth",
- "ScaleUnit": "6.1e-5MB"
+ "ScaleUnit": "6.1e-5MiB"
},
{
"MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
--
2.51.1.930.gacf6e81ea2-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB
2025-10-31 16:26 [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB Ian Rogers
@ 2025-11-12 19:31 ` Ian Rogers
2025-12-02 16:15 ` Ian Rogers
2025-12-10 5:39 ` Madhavan Srinivasan
1 sibling, 1 reply; 6+ messages in thread
From: Ian Rogers @ 2025-11-12 19:31 UTC (permalink / raw)
To: Athira Rajeev, Kajol Jain, Madhavan Srinivasan
Cc: linux-perf-users, Jiri Olsa, linux-kernel, Adrian Hunter,
Arnaldo Carvalho de Melo, Ian Rogers, Alexander Shishkin,
Peter Zijlstra, Namhyung Kim, Ingo Molnar
On Fri, Oct 31, 2025 at 9:26 AM Ian Rogers <irogers@google.com> wrote:
>
> 6.1e-5 is very close to 1/16384, where 16384 is 2^14, i.e. a power of
> 2. When units are in powers of 2 the IEC unit is MiB (mebibytes)
> rather than MB (megabytes) where the values are powers of 10. This
> patch corrects the unit for uniformity and because such units may be
> pattern matched against.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
Ping.
Thanks,
Ian
> ---
> .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> index 7a5d1bf543f8..8d028a7c2777 100644
> --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> @@ -29,25 +29,25 @@
> "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> "MetricName" : "mcs01-read",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> "MetricName" : "mcs23-read",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> "MetricName" : "mcs01-write",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> "MetricName" : "mcs23-write",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
> --
> 2.51.1.930.gacf6e81ea2-goog
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB
2025-11-12 19:31 ` Ian Rogers
@ 2025-12-02 16:15 ` Ian Rogers
0 siblings, 0 replies; 6+ messages in thread
From: Ian Rogers @ 2025-12-02 16:15 UTC (permalink / raw)
To: Athira Rajeev, Kajol Jain, Madhavan Srinivasan, Thomas Richter
Cc: linux-perf-users, Jiri Olsa, linux-kernel, Adrian Hunter,
Arnaldo Carvalho de Melo, Alexander Shishkin, Peter Zijlstra,
Namhyung Kim, Ingo Molnar
On Wed, Nov 12, 2025 at 11:31 AM Ian Rogers <irogers@google.com> wrote:
>
> On Fri, Oct 31, 2025 at 9:26 AM Ian Rogers <irogers@google.com> wrote:
> >
> > 6.1e-5 is very close to 1/16384, where 16384 is 2^14, i.e. a power of
> > 2. When units are in powers of 2 the IEC unit is MiB (mebibytes)
> > rather than MB (megabytes) where the values are powers of 10. This
> > patch corrects the unit for uniformity and because such units may be
> > pattern matched against.
> >
> > Signed-off-by: Ian Rogers <irogers@google.com>
>
> Ping.
Ping.
Thanks,
Ian
> > ---
> > .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > index 7a5d1bf543f8..8d028a7c2777 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > @@ -29,25 +29,25 @@
> > "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> > "MetricName" : "mcs01-read",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> > "MetricName" : "mcs23-read",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> > "MetricName" : "mcs01-write",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> > "MetricName" : "mcs23-write",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
> > --
> > 2.51.1.930.gacf6e81ea2-goog
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB
2025-10-31 16:26 [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB Ian Rogers
2025-11-12 19:31 ` Ian Rogers
@ 2025-12-10 5:39 ` Madhavan Srinivasan
2025-12-10 6:02 ` Ian Rogers
2025-12-16 18:28 ` Arnaldo Carvalho de Melo
1 sibling, 2 replies; 6+ messages in thread
From: Madhavan Srinivasan @ 2025-12-10 5:39 UTC (permalink / raw)
To: Ian Rogers, Athira Rajeev, Kajol Jain, Peter Zijlstra,
Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, linux-perf-users,
linux-kernel
On 10/31/25 9:56 PM, Ian Rogers wrote:
> 6.1e-5 is very close to 1/16384, where 16384 is 2^14, i.e. a power of
> 2. When units are in powers of 2 the IEC unit is MiB (mebibytes)
> rather than MB (megabytes) where the values are powers of 10. This
> patch corrects the unit for uniformity and because such units may be
> pattern matched against.
Changes looks fine to me.
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
b/w power10 metrics file could also have this fix I guess.
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> index 7a5d1bf543f8..8d028a7c2777 100644
> --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> @@ -29,25 +29,25 @@
> "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> "MetricName" : "mcs01-read",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> "MetricName" : "mcs23-read",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> "MetricName" : "mcs01-write",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> "MetricName" : "mcs23-write",
> "MetricGroup" : "memory-bandwidth",
> - "ScaleUnit": "6.1e-5MB"
> + "ScaleUnit": "6.1e-5MiB"
> },
> {
> "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB
2025-12-10 5:39 ` Madhavan Srinivasan
@ 2025-12-10 6:02 ` Ian Rogers
2025-12-16 18:28 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 6+ messages in thread
From: Ian Rogers @ 2025-12-10 6:02 UTC (permalink / raw)
To: Madhavan Srinivasan
Cc: Athira Rajeev, Kajol Jain, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Alexander Shishkin,
Jiri Olsa, Adrian Hunter, linux-perf-users, linux-kernel
On Tue, Dec 9, 2025 at 9:39 PM Madhavan Srinivasan <maddy@linux.ibm.com> wrote:
>
>
> On 10/31/25 9:56 PM, Ian Rogers wrote:
> > 6.1e-5 is very close to 1/16384, where 16384 is 2^14, i.e. a power of
> > 2. When units are in powers of 2 the IEC unit is MiB (mebibytes)
> > rather than MB (megabytes) where the values are powers of 10. This
> > patch corrects the unit for uniformity and because such units may be
> > pattern matched against.
>
>
> Changes looks fine to me.
>
> Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> b/w power10 metrics file could also have this fix I guess.
Thanks for the review! I don't see the same issue clearly on power10
as the ScaleUnits are different:
https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/powerpc/power10/nest_metrics.json?h=perf-tools-next
Thanks!
Ian
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> > .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > index 7a5d1bf543f8..8d028a7c2777 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > @@ -29,25 +29,25 @@
> > "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> > "MetricName" : "mcs01-read",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> > "MetricName" : "mcs23-read",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> > "MetricName" : "mcs01-write",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> > "MetricName" : "mcs23-write",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB
2025-12-10 5:39 ` Madhavan Srinivasan
2025-12-10 6:02 ` Ian Rogers
@ 2025-12-16 18:28 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-12-16 18:28 UTC (permalink / raw)
To: Madhavan Srinivasan
Cc: Ian Rogers, Athira Rajeev, Kajol Jain, Peter Zijlstra,
Ingo Molnar, Namhyung Kim, Alexander Shishkin, Jiri Olsa,
Adrian Hunter, linux-perf-users, linux-kernel
On Wed, Dec 10, 2025 at 11:09:40AM +0530, Madhavan Srinivasan wrote:
>
> On 10/31/25 9:56 PM, Ian Rogers wrote:
> > 6.1e-5 is very close to 1/16384, where 16384 is 2^14, i.e. a power of
> > 2. When units are in powers of 2 the IEC unit is MiB (mebibytes)
> > rather than MB (megabytes) where the values are powers of 10. This
> > patch corrects the unit for uniformity and because such units may be
> > pattern matched against.
>
>
> Changes looks fine to me.
>
> Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> b/w power10 metrics file could also have this fix I guess.
Thanks, applied to perf-tools-next,
- Arnaldo
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> > .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > index 7a5d1bf543f8..8d028a7c2777 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > @@ -29,25 +29,25 @@
> > "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> > "MetricName" : "mcs01-read",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> > "MetricName" : "mcs23-read",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> > "MetricName" : "mcs01-write",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> > "MetricName" : "mcs23-write",
> > "MetricGroup" : "memory-bandwidth",
> > - "ScaleUnit": "6.1e-5MB"
> > + "ScaleUnit": "6.1e-5MiB"
> > },
> > {
> > "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-12-16 18:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 16:26 [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB to MiB Ian Rogers
2025-11-12 19:31 ` Ian Rogers
2025-12-02 16:15 ` Ian Rogers
2025-12-10 5:39 ` Madhavan Srinivasan
2025-12-10 6:02 ` Ian Rogers
2025-12-16 18:28 ` Arnaldo Carvalho de Melo
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).