perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
Subsystems (3)
PATCH 1/3 perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
From: Kan Liang <[email protected]>
There was a mistake in the SNR uncore spec. The counter increments for every 32 bytes of data sent from the IO agent to the SOC, not 4 bytes which was documented in the spec.
The event list has been updated.
"EventName": "UNC_IIO_BANDWIDTH_IN.PART0_FREERUN", "BriefDescription": "Free running counter that increments for every 32
bytes of data sent from the IO agent to the SOC",
Update the scale of the IIO bandwidth in free running counters as well.
--- arch/x86/events/intel/uncore_snbep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/events/intel/uncore_snbep.c +8 -8
@@ -4891,28 +4891,28 @@ static struct uncore_event_desc snr_uncore_iio_freerunning_events[] = {INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ),/* Free-Running IIO BANDWIDTH IN Counters */ INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.0517578125e-5" ), INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"), { /* end: all zeroes */ }, };
Signature · 1 line
2.38.1
PATCH 2/3 perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
From: Kan Liang <[email protected]>
There was a mistake in the ICX uncore spec too. The counter increments for every 32 bytes rather than 4 bytes.
The same as SNR, there are 1 ioclk and 8 IIO bandwidth in free running counters. Reuse the snr_uncore_iio_freerunning_events().
--- arch/x86/events/intel/uncore_snbep.c | 33 +--------------------------- 1 file changed, 1 insertion(+), 32 deletions(-)
arch/x86/events/intel/uncore_snbep.c +1 -32
@@ -5485,37 +5485,6 @@ static struct freerunning_counters icx_iio_freerunning[] = { [ICX_IIO_MSR_BW_IN] = { 0xaa0, 0x1, 0x10, 8, 48, icx_iio_bw_freerunning_box_offsets }, }; -static struct uncore_event_desc icx_uncore_iio_freerunning_events[] = { -/* Free-Running IIO CLOCKS Counter */ -INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ), -/* Free-Running IIO BANDWIDTH IN Counters */ -INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.unit,"MiB" ), - {/* end: all zeroes */ }, -}; -static struct intel_uncore_type icx_uncore_iio_free_running = { .name ="iio_free_running" , .num_counters =9 ,
@@ -5523,7 +5492,7 @@ static struct intel_uncore_type icx_uncore_iio_free_running = { .num_freerunning_types = ICX_IIO_FREERUNNING_TYPE_MAX, .freerunning = icx_iio_freerunning, .ops = &skx_uncore_iio_freerunning_ops, - .event_descs = icx_uncore_iio_freerunning_events, + .event_descs = snr_uncore_iio_freerunning_events, .format_group = &skx_uncore_iio_freerunning_format_group, };
Signature · 1 line
2.38.1
PATCH 3/3 perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
In reply to [email protected]From: Kan Liang <[email protected]>
The scale of IIO bandwidth in free running counters is inherited from the ICX. The counter increments for every 32 bytes rather than 4 bytes.
The IIO bandwidth out free running counters don't increment with a consistent size. The increment depends on the requested size. It's impossible to find a fixed increment. Remove it from the event_descs.
--- arch/x86/events/intel/uncore_snbep.c | 58 +--------------------------- 1 file changed, 1 insertion(+), 57 deletions(-)
arch/x86/events/intel/uncore_snbep.c +1 -57
@@ -6289,69 +6289,13 @@ static struct freerunning_counters spr_iio_freerunning[] = { [SPR_IIO_MSR_BW_OUT] = { 0x3808, 0x1, 0x10, 8, 48 }, }; -static struct uncore_event_desc spr_uncore_iio_freerunning_events[] = { -/* Free-Running IIO CLOCKS Counter */ -INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ), -/* Free-Running IIO BANDWIDTH IN Counters */ -INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.unit,"MiB" ), -/* Free-Running IIO BANDWIDTH OUT Counters */ -INTEL_UNCORE_EVENT_DESC (bw_out_port0,"event=0xff,umask=0x30" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1,"event=0xff,umask=0x31" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2,"event=0xff,umask=0x32" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3,"event=0xff,umask=0x33" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4,"event=0xff,umask=0x34" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5,"event=0xff,umask=0x35" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6,"event=0xff,umask=0x36" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7,"event=0xff,umask=0x37" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7.unit,"MiB" ), - {/* end: all zeroes */ }, -}; -static struct intel_uncore_type spr_uncore_iio_free_running = { .name ="iio_free_running" , .num_counters =17 , .num_freerunning_types =SPR_IIO_FREERUNNING_TYPE_MAX , .freerunning = spr_iio_freerunning, .ops = &skx_uncore_iio_freerunning_ops, - .event_descs = spr_uncore_iio_freerunning_events, + .event_descs = snr_uncore_iio_freerunning_events, .format_group = &skx_uncore_iio_freerunning_format_group, };
Signature · 1 line
2.38.1
[tip: perf/urgent] perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 97757ffedde4edf1bb86b009316f8bd42327fcd5 Gitweb: https://git.kernel.org/tip/97757ffedde4edf1bb86b009316f8bd42327fcd5 Author: Kan Liang <[email protected]> AuthorDate: Wed, 16 Apr 2025 07:24:26 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 17 Apr 2025 12:19:17 +02:00
perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
The scale of IIO bandwidth in free running counters is inherited from the ICX. The counter increments for every 32 bytes rather than 4 bytes.
The IIO bandwidth out free running counters don't increment with a consistent size. The increment depends on the requested size. It's impossible to find a fixed increment. Remove it from the event_descs.
--- arch/x86/events/intel/uncore_snbep.c | 58 +--------------------------- 1 file changed, 1 insertion(+), 57 deletions(-)
arch/x86/events/intel/uncore_snbep.c +1 -57
@@ -6289,69 +6289,13 @@ static struct freerunning_counters spr_iio_freerunning[] = { [SPR_IIO_MSR_BW_OUT] = { 0x3808, 0x1, 0x10, 8, 48 }, }; -static struct uncore_event_desc spr_uncore_iio_freerunning_events[] = { -/* Free-Running IIO CLOCKS Counter */ -INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ), -/* Free-Running IIO BANDWIDTH IN Counters */ -INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.unit,"MiB" ), -/* Free-Running IIO BANDWIDTH OUT Counters */ -INTEL_UNCORE_EVENT_DESC (bw_out_port0,"event=0xff,umask=0x30" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1,"event=0xff,umask=0x31" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2,"event=0xff,umask=0x32" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3,"event=0xff,umask=0x33" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4,"event=0xff,umask=0x34" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5,"event=0xff,umask=0x35" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6,"event=0xff,umask=0x36" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7,"event=0xff,umask=0x37" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7.unit,"MiB" ), - {/* end: all zeroes */ }, -}; -static struct intel_uncore_type spr_uncore_iio_free_running = { .name ="iio_free_running" , .num_counters =17 , .num_freerunning_types =SPR_IIO_FREERUNNING_TYPE_MAX , .freerunning = spr_iio_freerunning, .ops = &skx_uncore_iio_freerunning_ops, - .event_descs = spr_uncore_iio_freerunning_events, + .event_descs = snr_uncore_iio_freerunning_events, .format_group = &skx_uncore_iio_freerunning_format_group, };
[tip: perf/urgent] perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
In reply to [email protected]The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 33bb2d134a761cf002e0517a1cb7edd9b5431733 Gitweb: https://git.kernel.org/tip/33bb2d134a761cf002e0517a1cb7edd9b5431733 Author: Kan Liang <[email protected]> AuthorDate: Wed, 16 Apr 2025 07:24:25 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 17 Apr 2025 12:19:17 +02:00
perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
There was a mistake in the ICX uncore spec too. The counter increments for every 32 bytes rather than 4 bytes.
The same as SNR, there are 1 ioclk and 8 IIO bandwidth in free running counters. Reuse the snr_uncore_iio_freerunning_events().
--- arch/x86/events/intel/uncore_snbep.c | 33 +--------------------------- 1 file changed, 1 insertion(+), 32 deletions(-)
arch/x86/events/intel/uncore_snbep.c +1 -32
@@ -5485,37 +5485,6 @@ static struct freerunning_counters icx_iio_freerunning[] = { [ICX_IIO_MSR_BW_IN] = { 0xaa0, 0x1, 0x10, 8, 48, icx_iio_bw_freerunning_box_offsets }, }; -static struct uncore_event_desc icx_uncore_iio_freerunning_events[] = { -/* Free-Running IIO CLOCKS Counter */ -INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ), -/* Free-Running IIO BANDWIDTH IN Counters */ -INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.unit,"MiB" ), - {/* end: all zeroes */ }, -}; -static struct intel_uncore_type icx_uncore_iio_free_running = { .name ="iio_free_running" , .num_counters =9 ,
@@ -5523,7 +5492,7 @@ static struct intel_uncore_type icx_uncore_iio_free_running = { .num_freerunning_types = ICX_IIO_FREERUNNING_TYPE_MAX, .freerunning = icx_iio_freerunning, .ops = &skx_uncore_iio_freerunning_ops, - .event_descs = icx_uncore_iio_freerunning_events, + .event_descs = snr_uncore_iio_freerunning_events, .format_group = &skx_uncore_iio_freerunning_format_group, };
The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 73ff7904cab2289e9332013d2bcd40f3885e5a96 Gitweb: https://git.kernel.org/tip/73ff7904cab2289e9332013d2bcd40f3885e5a96 Author: Kan Liang <[email protected]> AuthorDate: Wed, 16 Apr 2025 07:24:24 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 17 Apr 2025 12:19:17 +02:00
perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
There was a mistake in the SNR uncore spec. The counter increments for every 32 bytes of data sent from the IO agent to the SOC, not 4 bytes which was documented in the spec.
The event list has been updated:
"EventName": "UNC_IIO_BANDWIDTH_IN.PART0_FREERUN", "BriefDescription": "Free running counter that increments for every 32
bytes of data sent from the IO agent to the SOC",
Update the scale of the IIO bandwidth in free running counters as well.
--- arch/x86/events/intel/uncore_snbep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/events/intel/uncore_snbep.c +8 -8
@@ -4891,28 +4891,28 @@ static struct uncore_event_desc snr_uncore_iio_freerunning_events[] = {INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ),/* Free-Running IIO BANDWIDTH IN Counters */ INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.0517578125e-5" ), INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"), { /* end: all zeroes */ }, };
[tip: perf/urgent] perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
In reply to [email protected]The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 506f981ab40f0b03a11a640cfd77f48b09aff330 Gitweb: https://git.kernel.org/tip/506f981ab40f0b03a11a640cfd77f48b09aff330 Author: Kan Liang <[email protected]> AuthorDate: Wed, 16 Apr 2025 07:24:26 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 17 Apr 2025 12:57:32 +02:00
perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
The scale of IIO bandwidth in free running counters is inherited from the ICX. The counter increments for every 32 bytes rather than 4 bytes.
The IIO bandwidth out free running counters don't increment with a consistent size. The increment depends on the requested size. It's impossible to find a fixed increment. Remove it from the event_descs.
--- arch/x86/events/intel/uncore_snbep.c | 58 +--------------------------- 1 file changed, 1 insertion(+), 57 deletions(-)
arch/x86/events/intel/uncore_snbep.c +1 -57
@@ -6289,69 +6289,13 @@ static struct freerunning_counters spr_iio_freerunning[] = { [SPR_IIO_MSR_BW_OUT] = { 0x3808, 0x1, 0x10, 8, 48 }, }; -static struct uncore_event_desc spr_uncore_iio_freerunning_events[] = { -/* Free-Running IIO CLOCKS Counter */ -INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ), -/* Free-Running IIO BANDWIDTH IN Counters */ -INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.unit,"MiB" ), -/* Free-Running IIO BANDWIDTH OUT Counters */ -INTEL_UNCORE_EVENT_DESC (bw_out_port0,"event=0xff,umask=0x30" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1,"event=0xff,umask=0x31" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2,"event=0xff,umask=0x32" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3,"event=0xff,umask=0x33" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4,"event=0xff,umask=0x34" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5,"event=0xff,umask=0x35" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6,"event=0xff,umask=0x36" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7,"event=0xff,umask=0x37" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_out_port7.unit,"MiB" ), - {/* end: all zeroes */ }, -}; -static struct intel_uncore_type spr_uncore_iio_free_running = { .name ="iio_free_running" , .num_counters =17 , .num_freerunning_types =SPR_IIO_FREERUNNING_TYPE_MAX , .freerunning = spr_iio_freerunning, .ops = &skx_uncore_iio_freerunning_ops, - .event_descs = spr_uncore_iio_freerunning_events, + .event_descs = snr_uncore_iio_freerunning_events, .format_group = &skx_uncore_iio_freerunning_format_group, };
[tip: perf/urgent] perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
In reply to [email protected]The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 32c7f1150225694d95a51110a93be25db03bb5db Gitweb: https://git.kernel.org/tip/32c7f1150225694d95a51110a93be25db03bb5db Author: Kan Liang <[email protected]> AuthorDate: Wed, 16 Apr 2025 07:24:25 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 17 Apr 2025 12:57:29 +02:00
perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
There was a mistake in the ICX uncore spec too. The counter increments for every 32 bytes rather than 4 bytes.
The same as SNR, there are 1 ioclk and 8 IIO bandwidth in free running counters. Reuse the snr_uncore_iio_freerunning_events().
--- arch/x86/events/intel/uncore_snbep.c | 33 +--------------------------- 1 file changed, 1 insertion(+), 32 deletions(-)
arch/x86/events/intel/uncore_snbep.c +1 -32
@@ -5485,37 +5485,6 @@ static struct freerunning_counters icx_iio_freerunning[] = { [ICX_IIO_MSR_BW_IN] = { 0xaa0, 0x1, 0x10, 8, 48, icx_iio_bw_freerunning_box_offsets }, }; -static struct uncore_event_desc icx_uncore_iio_freerunning_events[] = { -/* Free-Running IIO CLOCKS Counter */ -INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ), -/* Free-Running IIO BANDWIDTH IN Counters */ -INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.unit,"MiB" ), - {/* end: all zeroes */ }, -}; -static struct intel_uncore_type icx_uncore_iio_free_running = { .name ="iio_free_running" , .num_counters =9 ,
@@ -5523,7 +5492,7 @@ static struct intel_uncore_type icx_uncore_iio_free_running = { .num_freerunning_types = ICX_IIO_FREERUNNING_TYPE_MAX, .freerunning = icx_iio_freerunning, .ops = &skx_uncore_iio_freerunning_ops, - .event_descs = icx_uncore_iio_freerunning_events, + .event_descs = snr_uncore_iio_freerunning_events, .format_group = &skx_uncore_iio_freerunning_format_group, };
The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 96a720db59ab330c8562b2437153faa45dac705f Gitweb: https://git.kernel.org/tip/96a720db59ab330c8562b2437153faa45dac705f Author: Kan Liang <[email protected]> AuthorDate: Wed, 16 Apr 2025 07:24:24 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 17 Apr 2025 12:57:20 +02:00
perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
There was a mistake in the SNR uncore spec. The counter increments for every 32 bytes of data sent from the IO agent to the SOC, not 4 bytes which was documented in the spec.
The event list has been updated:
"EventName": "UNC_IIO_BANDWIDTH_IN.PART0_FREERUN", "BriefDescription": "Free running counter that increments for every 32
bytes of data sent from the IO agent to the SOC",
Update the scale of the IIO bandwidth in free running counters as well.
--- arch/x86/events/intel/uncore_snbep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/events/intel/uncore_snbep.c +8 -8
@@ -4891,28 +4891,28 @@ static struct uncore_event_desc snr_uncore_iio_freerunning_events[] = {INTEL_UNCORE_EVENT_DESC (ioclk,"event=0xff,umask=0x10" ),/* Free-Running IIO BANDWIDTH IN Counters */ INTEL_UNCORE_EVENT_DESC (bw_in_port0,"event=0xff,umask=0x20" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port0.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port0.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port1,"event=0xff,umask=0x21" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port1.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port1.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port2,"event=0xff,umask=0x22" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port2.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port2.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port3,"event=0xff,umask=0x23" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port3.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port3.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port4,"event=0xff,umask=0x24" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port4.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port4.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port5,"event=0xff,umask=0x25" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port5.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port5.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port6,"event=0xff,umask=0x26" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port6.scale,"3.0517578125e-5" ),INTEL_UNCORE_EVENT_DESC (bw_in_port6.unit,"MiB" ),INTEL_UNCORE_EVENT_DESC (bw_in_port7,"event=0xff,umask=0x27" ), -INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.814697266e-6" ), +INTEL_UNCORE_EVENT_DESC (bw_in_port7.scale,"3.0517578125e-5" ), INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"), { /* end: all zeroes */ }, };