lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fVqt_bUcqjiGArVuQFfFjn3duJZUye48_LCgLVa9iPdwA@mail.gmail.com>
Date: Tue, 9 Dec 2025 22:02:26 -0800
From: Ian Rogers <irogers@...gle.com>
To: Madhavan Srinivasan <maddy@...ux.ibm.com>
Cc: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>, Kajol Jain <kjain@...ux.ibm.com>, 
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, linux-perf-users@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf vendor power9 nest metrics: Correct unit from MB
 to MiB

On Tue, Dec 9, 2025 at 9:39 PM Madhavan Srinivasan <maddy@...ux.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@...ux.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@...gle.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@...MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@...MCS01_128B_RD_DISP_PORT23@",
> >       "MetricName" : "mcs01-read",
> >       "MetricGroup" : "memory-bandwidth",
> > -     "ScaleUnit": "6.1e-5MB"
> > +     "ScaleUnit": "6.1e-5MiB"
> >       },
> >       {
> >       "MetricExpr" : "nest_mcs23_imc@...MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@...MCS23_128B_RD_DISP_PORT23@",
> >       "MetricName" : "mcs23-read",
> >       "MetricGroup" : "memory-bandwidth",
> > -     "ScaleUnit": "6.1e-5MB"
> > +     "ScaleUnit": "6.1e-5MiB"
> >       },
> >       {
> >       "MetricExpr" : "nest_mcs01_imc@...MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@...MCS01_128B_WR_DISP_PORT23@",
> >       "MetricName" : "mcs01-write",
> >       "MetricGroup" : "memory-bandwidth",
> > -     "ScaleUnit": "6.1e-5MB"
> > +     "ScaleUnit": "6.1e-5MiB"
> >       },
> >       {
> >       "MetricExpr" : "nest_mcs23_imc@...MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@...MCS23_128B_WR_DISP_PORT23@",
> >       "MetricName" : "mcs23-write",
> >       "MetricGroup" : "memory-bandwidth",
> > -     "ScaleUnit": "6.1e-5MB"
> > +     "ScaleUnit": "6.1e-5MiB"
> >       },
> >       {
> >       "MetricExpr" : "nest_powerbus0_imc@...PB_CYC@",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ