Skip to contentSkip to conversation

perf vendor power9 nest metrics: Correct unit from MB to MiB

PATCH Applied Ian Rogers 3 participants 6 messages Oct 31, 2025 – Dec 16, 2025 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf vendor power9 nest metrics: Correct unit from MB to MiB

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.

---
 .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json +4 -4
index 7a5d1bf543f8..8d028a7c2777 100644
@@ -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@",
Signature · 1 line
2.51.1.930.gacf6e81ea2-goog
author reviewer
#1 lore raw
Quoted 8 lines · Ian Rogers

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.

Ping.

Thanks,
Ian

Quoted 41 lines
---
 .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json +4 -5
index 7a5d1bf543f8..8d028a7c2777 100644
@@ -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

author reviewer
#2 lore raw
Quoted 9 lines · Ian Rogers
Quoted 7 lines · Ian Rogers

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.

Quoted 3 lines
Quoted 1 line

Ping.

Ping.

Thanks,
Ian

Quoted 41 lines
Quoted 41 lines
---
 .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json +4 -5
index 7a5d1bf543f8..8d028a7c2777 100644
@@ -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

Reviewed-by on v1 1/1
#3 lore raw
In reply to Ian Rogers
Quoted 5 lines · Ian Rogers

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.

b/w  power10 metrics file could also have this fix I guess.

Quoted 39 lines
---
  .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json +4 -4
index 7a5d1bf543f8..8d028a7c2777 100644
@@ -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@",
author reviewer
#4 lore raw
Quoted 10 lines · Madhavan Srinivasan
Quoted 5 lines · Ian Rogers

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.

Quoted 4 lines

Changes looks fine to me.

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

Quoted 39 lines
Quoted 39 lines
---
  .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json +4 -4
index 7a5d1bf543f8..8d028a7c2777 100644
@@ -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@",
maintainer Applied
#5 lore raw
In reply to Madhavan Srinivasan
Quoted 9 lines · Madhavan Srinivasan
Quoted 5 lines · Ian Rogers

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.

Quoted 4 lines

Changes looks fine to me.

b/w  power10 metrics file could also have this fix I guess.

Thanks, applied to perf-tools-next,

- Arnaldo

Quoted 39 lines
Quoted 39 lines
---
  .../perf/pmu-events/arch/powerpc/power9/nest_metrics.json | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json +4 -4
index 7a5d1bf543f8..8d028a7c2777 100644
@@ -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@",