lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO6PR11MB563550B4AB0D89D6DAC39CBAEEBE2@CO6PR11MB5635.namprd11.prod.outlook.com>
Date: Mon, 5 Aug 2024 18:34:32 +0000
From: "Wang, Weilin" <weilin.wang@...el.com>
To: Song Liu <song@...nel.org>, "Liang, Kan" <kan.liang@...ux.intel.com>
CC: Ian Rogers <irogers@...gle.com>, "Taylor, Perry" <perry.taylor@...el.com>,
	"Baker, Edward" <edward.baker@...el.com>, "Daneti, Venkata Naga Sai Dilip"
	<venkata.naga.sai.dilip.daneti@...el.com>, Arnaldo Carvalho de Melo
	<acme@...nel.org>, "Hunter, Adrian" <adrian.hunter@...el.com>,
	"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>, "open
 list" <linux-kernel@...r.kernel.org>, Namhyung Kim <namhyung@...nel.org>,
	Jiri Olsa <jolsa@...nel.org>, "jonesz@...a.com" <jonesz@...a.com>
Subject: RE: Some unc_cha_tor_* events appear to be "not supported"?



> -----Original Message-----
> From: Song Liu <song@...nel.org>
> Sent: Friday, August 2, 2024 2:51 PM
> To: Wang, Weilin <weilin.wang@...el.com>
> Cc: Ian Rogers <irogers@...gle.com>; Taylor, Perry <perry.taylor@...el.com>;
> Baker, Edward <edward.baker@...el.com>; Daneti, Venkata Naga Sai Dilip
> <venkata.naga.sai.dilip.daneti@...el.com>; Liang, Kan
> <kan.liang@...ux.intel.com>; Arnaldo Carvalho de Melo <acme@...nel.org>;
> Hunter, Adrian <adrian.hunter@...el.com>; linux-perf-users@...r.kernel.org;
> open list <linux-kernel@...r.kernel.org>; Namhyung Kim
> <namhyung@...nel.org>; Jiri Olsa <jolsa@...nel.org>; jonesz@...a.com
> Subject: Re: Some unc_cha_tor_* events appear to be "not supported"?
> 
> Hi folks,
> 
> What are the next steps with this issue? I guess we need to update the
> scripts and regenerate the JSON files?
> 
> Thanks,
> Song
> 
> On Thu, Jul 25, 2024 at 10:52 AM Wang, Weilin <weilin.wang@...el.com>
> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Ian Rogers <irogers@...gle.com>
> > > Sent: Thursday, July 25, 2024 10:00 AM
> > > To: Song Liu <song@...nel.org>; Wang, Weilin <weilin.wang@...el.com>;
> > > Taylor, Perry <perry.taylor@...el.com>
> > > Cc: Liang, Kan <kan.liang@...ux.intel.com>; Arnaldo Carvalho de Melo
> > > <acme@...nel.org>; Hunter, Adrian <adrian.hunter@...el.com>; linux-
> perf-
> > > users@...r.kernel.org; open list <linux-kernel@...r.kernel.org>;
> Namhyung
> > > Kim <namhyung@...nel.org>; Jiri Olsa <jolsa@...nel.org>;
> jonesz@...a.com
> > > Subject: Re: Some unc_cha_tor_* events appear to be "not supported"?
> > >
> > > On Thu, Jul 25, 2024 at 9:39 AM Song Liu <song@...nel.org> wrote:
> > > >
> > > > Hi Kan,
> > > >
> > > > Thanks for your quick response!
> > > >
> > > > On Thu, Jul 25, 2024 at 6:37 AM Liang, Kan <kan.liang@...ux.intel.com>
> > > wrote:
> > > > >
> > > > >
> > > > >
> > > > > On 2024-07-24 6:39 p.m., Song Liu wrote:
> > > > > > Hi folks,
> > > > > >
> > > > > > We noticed that some unc_cha_tor_occupancy and
> unc_cha_tor_inserts
> > > events
> > > > > > appear to be "not supported" and always counting zero (see an
> example
> > > below).
> > > > > > Is this a known issue? We are testing with 6.10 kernel and perf.
> > > > > >
> > > > > > Thanks,
> > > > > > Song
> > > > > >
> > > > > >
> > > > > > [root@...neltest008.05.atn6 ~]# ./perf list | grep
> > > > > > unc_cha_tor_occupancy.ia_hit_llcprefdrd
> > > > > >   unc_cha_tor_occupancy.ia_hit_llcprefdrd
> > > > > > [root@...neltest008.05.atn6 ~]# ./perf stat -e
> > > > > > unc_cha_tor_occupancy.ia_hit_llcprefdrd -a -- sleep 1
> > > > > > WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> > > > >
> > > > >
> > > > > 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!

> > >
> 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"
    },

Thanks,
Weilin

> > > > >
> > >
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/
> > > perf/pmu-events/arch/x86/skylakex/uncore-cache.json#n4489
> > > > >
> > > > > Can you please try the below event?
> > > > > uncore_cha/event=0x35,umask=0x11,config1=0x4b43300000000/
> > > >
> > > > This appears to work. I also tried events like:
> > > >
> > > >
> > >
> uncore_cha/UNC_CHA_TOR_OCCUPANCY.IA_MISS,config1=0x40432000000
> > > 00/
> > > >
> > >
> uncore_cha/UNC_CHA_TOR_INSERTS.IA_MISS,config1=0x4043200000000/
> > > >
> > > > Do you have an idea on how to fix the convert script? I haven't looked
> > > > into these codes.
> > >
> > > The converter script logic is here:
> > >
> https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py#L3
> > > 95
> > > but presumably this worked at some point or is needed on other models.
> > > Checking the perf json I see:
> > > ```
> > > $ grep -rl config1 tools/perf/pmu-events/arch/x86/
> > > tools/perf/pmu-events/arch/x86/snowridgex/uncore-cache.json
> > > tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json
> > > tools/perf/pmu-events/arch/x86/skylakex/uncore-cache.json
> > > tools/perf/pmu-events/arch/x86/cascadelakex/uncore-cache.json
> > > tools/perf/pmu-events/arch/x86/cascadelakex/clx-metrics.json
> > > ```
> > > Since CLX is near equal to SKX, and the metrics will presumably be
> > > false hits, perhaps shifting this value will break snowridgex - I have
> > > no such machine to test on.
> > >
> > > Using config1 values rather than formats is odd to me. On a SkylakeX I see:
> > > ```
> > > $ grep -r config1 /sys/devices/uncore_cha_0/format/
> > > /sys/devices/uncore_cha_0/format/filter_rem:config1:32
> > > /sys/devices/uncore_cha_0/format/filter_opc0:config1:41-50
> > > /sys/devices/uncore_cha_0/format/filter_isoc:config1:63
> > > /sys/devices/uncore_cha_0/format/filter_tid:config1:0-8
> > > /sys/devices/uncore_cha_0/format/filter_loc:config1:33
> > > /sys/devices/uncore_cha_0/format/filter_nc:config1:62
> > > /sys/devices/uncore_cha_0/format/filter_opc1:config1:51-60
> > > /sys/devices/uncore_cha_0/format/filter_all_op:config1:35
> > > /sys/devices/uncore_cha_0/format/filter_not_nm:config1:37
> > > /sys/devices/uncore_cha_0/format/filter_state:config1:17-26
> > > /sys/devices/uncore_cha_0/format/filter_nm:config1:36
> > > ```
> > >
> > > Adding Weilin and Perry as I'm unsure what the right fix should be. My
> > > thought is the input Intel perfmon json should break apart the filter
> > > value into opcodes, etc. and then in the converter script we add these
> > > to perf events like filter_opc0=0xb4.
> > >
> >
> > Adding Ed and Dilip for event related questions. I can follow up to update the
> > converter script once we are clear about the content we need/could provide
> > in event JSON.
> >
> > Thanks,
> > Weilin
> >
> > > Thanks,
> > > Ian
> > >
> > > > Thanks,
> > > > Song
> > > >
> > > > [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ