Re: Some unc_cha_tor_* events appear to be "not supported"?

From: Song Liu
Date: Mon Aug 05 2024 - 15:15:12 EST


Hi Weilin,

On Mon, Aug 5, 2024 at 11:34 AM Wang, Weilin <weilin.wang@xxxxxxxxx> wrote:
[...]
> > > > > >
> > > > > > The value '4b433' is for the 'Filter1', according to the original event
> > > > > > list.
> > > > > >
> > > > > >
>
> @Song Liu, do you see different output from some other unc_cha_tor_occupancy
> and unc_cha_tor_inserts events. Or, are all of them report the same warning like this
> example here?
>
> Could you please try UNC_CHA_TOR_OCCUPANCY.IA_MISS and share the output?
> Please also specify the platform you tested on. Thanks!

This event is working, I guess. Though the output is zero on the host.

[root@ ~]# perf stat -e UNC_CHA_TOR_OCCUPANCY.IA_MISS -a -- sleep 1

Performance counter stats for 'system wide':

0 UNC_CHA_TOR_OCCUPANCY.IA_MISS

1.002497126 seconds time elapsed

For this one, I am testing on Intel(R) Xeon(R) D-2191A CPU @ 1.60GHz.
I think the issue happens on all skylake and copperlake CPUs.

>
> > > >
> > https://github.com/intel/perfmon/blob/main/SKX/events/skylakex_uncore.js
> > > > on#L4634
> > > > > >
> > > > > > "EventName": "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
> > > > > > "BriefDescription":
> > > > "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
> > > > > > "PublicDescription":
> > > > "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
> > > > > > "Counter": "0",
> > > > > > "MSRValue": "0x00",
> > > > > > "ELLC": "0",
> > > > > > "Filter": "Filter1",
> > > > > > "ExtSel": "0",
> > > > > > "Deprecated": "0",
> > > > > > "FILTER_VALUE": "0x4b433"
> > > > > >
> > > > > > There are two filters for CHA on SKX. Each filter is 32 bits wide.
> > > > > > So the Linux kernel driver uses config1 (64 bits wide) to represent both
> > > > > > of them. The low 32 bits are for filter0 and high 32 bits are for filter1.
> > > > > >
> > > > > > It should be an issue of the convert script, which set the filter1 value
> > > > > > to the low 32 bits.
>
> @Liang, Kan, the following is the converted "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD"
> in perf JSON. The "Filter" filed has value "config1=0x4b433", which looks correct to
> me according to your description above.
>
> Please let me know your thoughts.
>
> {
> "BriefDescription": "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
> "Counter": "0",
> "EventCode": "0x36",
> "EventName": "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
> "Filter": "config1=0x4b433",
> "PerPkg": "1",
> "UMask": "0x21",
> "Unit": "CHA"
> },

I think we need config1 to be 0x4b43300000000?

Thanks,
Song