Skip to content

Commit 8191016

Browse files
Kan LiangPeter Zijlstra
authored andcommitted
perf/x86/intel/uncore: Fix the scale of the IMC free-running events
The "MiB" result of the IMC free-running bandwidth events, uncore_imc_free_running/read/ and uncore_imc_free_running/write/ are 16 times too small. The "MiB" value equals the raw IMC free-running bandwidth counter value times a "scale" which is inaccurate. The IMC free-running bandwidth events should be incremented per 64B cache line, not DWs (4 bytes). The "scale" should be 6.103515625e-5. Fix the "scale" for both Snow Ridge and Ice Lake. Fixes: 2b3b76b ("perf/x86/intel/uncore: Add Ice Lake server uncore support") Fixes: ee49532 ("perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge") Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200928133240.12977-1-kan.liang@linux.intel.com
1 parent f797f05 commit 8191016

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

arch/x86/events/intel/uncore_snbep.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4807,10 +4807,10 @@ static struct uncore_event_desc snr_uncore_imc_freerunning_events[] = {
48074807
INTEL_UNCORE_EVENT_DESC(dclk, "event=0xff,umask=0x10"),
48084808

48094809
INTEL_UNCORE_EVENT_DESC(read, "event=0xff,umask=0x20"),
4810-
INTEL_UNCORE_EVENT_DESC(read.scale, "3.814697266e-6"),
4810+
INTEL_UNCORE_EVENT_DESC(read.scale, "6.103515625e-5"),
48114811
INTEL_UNCORE_EVENT_DESC(read.unit, "MiB"),
48124812
INTEL_UNCORE_EVENT_DESC(write, "event=0xff,umask=0x21"),
4813-
INTEL_UNCORE_EVENT_DESC(write.scale, "3.814697266e-6"),
4813+
INTEL_UNCORE_EVENT_DESC(write.scale, "6.103515625e-5"),
48144814
INTEL_UNCORE_EVENT_DESC(write.unit, "MiB"),
48154815
{ /* end: all zeroes */ },
48164816
};
@@ -5268,17 +5268,17 @@ static struct uncore_event_desc icx_uncore_imc_freerunning_events[] = {
52685268
INTEL_UNCORE_EVENT_DESC(dclk, "event=0xff,umask=0x10"),
52695269

52705270
INTEL_UNCORE_EVENT_DESC(read, "event=0xff,umask=0x20"),
5271-
INTEL_UNCORE_EVENT_DESC(read.scale, "3.814697266e-6"),
5271+
INTEL_UNCORE_EVENT_DESC(read.scale, "6.103515625e-5"),
52725272
INTEL_UNCORE_EVENT_DESC(read.unit, "MiB"),
52735273
INTEL_UNCORE_EVENT_DESC(write, "event=0xff,umask=0x21"),
5274-
INTEL_UNCORE_EVENT_DESC(write.scale, "3.814697266e-6"),
5274+
INTEL_UNCORE_EVENT_DESC(write.scale, "6.103515625e-5"),
52755275
INTEL_UNCORE_EVENT_DESC(write.unit, "MiB"),
52765276

52775277
INTEL_UNCORE_EVENT_DESC(ddrt_read, "event=0xff,umask=0x30"),
5278-
INTEL_UNCORE_EVENT_DESC(ddrt_read.scale, "3.814697266e-6"),
5278+
INTEL_UNCORE_EVENT_DESC(ddrt_read.scale, "6.103515625e-5"),
52795279
INTEL_UNCORE_EVENT_DESC(ddrt_read.unit, "MiB"),
52805280
INTEL_UNCORE_EVENT_DESC(ddrt_write, "event=0xff,umask=0x31"),
5281-
INTEL_UNCORE_EVENT_DESC(ddrt_write.scale, "3.814697266e-6"),
5281+
INTEL_UNCORE_EVENT_DESC(ddrt_write.scale, "6.103515625e-5"),
52825282
INTEL_UNCORE_EVENT_DESC(ddrt_write.unit, "MiB"),
52835283
{ /* end: all zeroes */ },
52845284
};

0 commit comments

Comments
 (0)