mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
	kernel test robot <yi1.lai@intel.com>,
	"Taylor, Perry" <perry.taylor@intel.com>,
	Thomas Falcon <thomas.falcon@intel.com>,
	Edward <edward.baker@intel.com>,
	"Chen, Zide" <zide.chen@intel.com>,
	luis.f.recalde@intel.com
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	linux-perf-users@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: Re: [linus:master] [perf vendor events intel] 31efbec216: perf-stat-tests.UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU.fail
Date: Thu, 5 Nov 2026 13:41:53 +0800	[thread overview]
Message-ID: <2d1a2dcb-f1db-4126-80b7-217a62cea136@linux.intel.com> (raw)
In-Reply-To: <CAP-5=fUk4Q3PxNiqwHtyM6XTt9LGZaTe9p7o9k2gL7f2LBRBHw@mail.gmail.com>


On 11/5/2026 12:22 PM, Ian Rogers wrote:
> On Wed, Nov 4, 2026 at 5:47 PM kernel test robot <yi1.lai@intel.com> wrote:
>>
>>
>> Hello,
>>
>> kernel test robot noticed "perf-stat-tests.UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU.fail" on:
>>
>> commit: 31efbec2161d2d31b020b086958e41f35f070a38 ("perf vendor events intel: Update sapphirerapids events from 1.39 to 1.40") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>>
>> [test failed on linux-next/master 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c]
>>
>> in testcase: perf-stat-tests
>> with following parameters:
>>
>>
>> config: x86_64-rhel-9.4-bpf
>> compiler: gcc-14
>> test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
>>
>> (please refer to attached dmesg/kmsg for entire log/backtrace)
>>
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <yi1.lai@intel.com>
>> | Closes: https://lore.kernel.org/oe-lkp/202611050912.2cdf1ff5-lkp@intel.com
>>
>>
>> EventName: UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU
>> 2026-10-05 17:15:24 perf stat -e UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU -a sleep 0.1
>> event syntax error: 'UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                      \___ Bad event name
>>
>> Unable to find event on a PMU of 'UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU'
> Ok, this is an ugly issue. When we fixed the issue so that umasks of 0
> weren't dropped, we added new umasks:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=31efbec2161d2d31b020b086958e41f35f070a38
> ```
> ...
> @@ -1923,6 +1974,7 @@
>          "PerPkg": "1",
>          "PortMask": "0x0000",
>          "PublicDescription": "UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU",
> +        "UMask": "0x7000000",
> ...
> ```
> The umask calculation is odd:
> https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py#L361
> ```
>         # Combine the umask with the umask_ext. We don't know the
>         # width of the umask as we concatenate the strings, removing
>         # "0x"
>         if umask_ext:
>             self.umask = umask_ext + self.umask[2:] if self.umask else
> umask_ext + "00"
> ```
> For Sapphire Rapids the UMaskExt is:
> https://github.com/intel/perfmon/blob/main/SPR/events/sapphirerapids_uncore_experimental.json#L17422
> ```
> ...
>     {
>       "Unit": "IIO",
>       "EventCode": "0x8f",
>       "UMask": "0x00",
>       "PortMask": "0x0000",
>       "FCMask": "0x00",
>       "UMaskExt": "0x00070000",
>       "EventName": "UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU",
>       "BriefDescription": "ITC address map 1",
>       "PublicDescription": "UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU",
>       "Counter": "0,1,2,3",
>       "ELLC": "0",
>       "Filter": "na",
>       "ExtSel": "0",
>       "Deprecated": "0",
>       "FILTER_VALUE": "0",
>       "CounterType": "PGMABLE"
>     },
> ...
> ```
> So that's hex 7 followed by 4 zeros. In the generated perf json it is
> hex 7 followed by 6 zeros as we concatenated the UMask's 00 to the
> front.
>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
> This error indicates that the UMask for the IIO PMU only expects
> values from 0 to 255.

+ Zide, Luis

According to current uncore driver, SPR IIO supports the extended umask
field which locates at bits [50:32], so the UMaskExt data of
UNC_IIO_NUM_TGT_MATCHED_REQ_OF_CPU looks correct. I suppose we should not
or could be very hard to check the valid range of umaskext in perf tools.
Currently different uncore PMUs may have different umaskext layout and the
umaskext of some uncore events could be very large.

Currently the Intel uncore driver would validate the umask/umaskext from
user space. It would be good enough.

@Luis, @Edward, please double confirm. Thanks.


>
> So something is wrong in how we interpret the UMask and UMaskExt for
> Sapphire Rapids' IIO. Could someone from Intel take a look? Is the
> problem in the original perfmon event json, is there a different way
> to encode the UMaskExt for the IIO on SPR or is the IIO PMU on SPR
> constraining the umask too much?
>
> Thanks,
> Ian
>
>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>>
>> event syntax error: '..O_NUM_TGT_MATCHED_REQ_OF_CPU'
>>                                   \___ value too big for format (umask), maximum is 255
>> Run 'perf list' for a list of valid events
>>
>>  Usage: perf stat [<options>] [<command>]
>>
>>     -e, --event <event>   event selector. use 'perf list' to list available events
>>
>>
>> The kernel config and materials to reproduce are available at:
>> https://download.01.org/0day-ci/archive/20261105/202611050912.2cdf1ff5-lkp@intel.com
>>
>>
>> --
>> 0-DAY CI Kernel Test Service
>> https://github.com/intel/lkp-tests/wiki
>>
>>

      reply	other threads:[~2026-11-05  5:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  1:47 kernel test robot
2026-11-05  4:22 ` Ian Rogers
2026-11-05  5:41   ` Mi, Dapeng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d1a2dcb-f1db-4126-80b7-217a62cea136@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=acme@redhat.com \
    --cc=edward.baker@intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=luis.f.recalde@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=perry.taylor@intel.com \
    --cc=thomas.falcon@intel.com \
    --cc=yi1.lai@intel.com \
    --cc=zide.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®