RE: Some unc_cha_tor_* events appear to be "not supported"?
From: Wang, Weilin
Date: Mon Aug 05 2024 - 16:26:58 EST
> -----Original Message-----
> From: Song Liu <song@xxxxxxxxxx>
> Sent: Monday, August 5, 2024 12:15 PM
> To: Wang, Weilin <weilin.wang@xxxxxxxxx>
> Cc: Liang, Kan <kan.liang@xxxxxxxxxxxxxxx>; Ian Rogers <irogers@xxxxxxxxxx>;
> Taylor, Perry <perry.taylor@xxxxxxxxx>; Baker, Edward
> <edward.baker@xxxxxxxxx>; Daneti, Venkata Naga Sai Dilip
> <venkata.naga.sai.dilip.daneti@xxxxxxxxx>; Arnaldo Carvalho de Melo
> <acme@xxxxxxxxxx>; Hunter, Adrian <adrian.hunter@xxxxxxxxx>; linux-perf-
> users@xxxxxxxxxxxxxxx; open list <linux-kernel@xxxxxxxxxxxxxxx>; Namhyung
> Kim <namhyung@xxxxxxxxxx>; Jiri Olsa <jolsa@xxxxxxxxxx>; jonesz@xxxxxxxx
> Subject: Re: Some unc_cha_tor_* events appear to be "not supported"?
>
> 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.
This looks correct. I thinks some of this type of events are supposed to be always
return 0.
>
> >
> > > > >
> > >
> 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?
If this is the value required, @Liang, Kan and @Ian Rogers, should we update the
converter script to set 0x4b43300000000 or let kernel to pad the zeros? I want to
ensure that we won't break other platforms if change this in the converter script.
Thanks,
Weilin
>
> Thanks,
> Song