public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Arcari <darcari@redhat.com>
To: "Mi, Dapeng1" <dapeng1.mi@intel.com>, Len Brown <lenb@kernel.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tools/power turbostat: Allow execution to continue after perf_l2_init() failure
Date: Tue, 14 Apr 2026 09:48:20 -0400	[thread overview]
Message-ID: <e6994ee6-328d-482e-bfac-907cea307ebb@redhat.com> (raw)
In-Reply-To: <MN0PR11MB61604669C6DF6D1F372108EACD252@MN0PR11MB6160.namprd11.prod.outlook.com>

kernel is a Fedora version of 7.0.0-0.rc4

I have two ADL systems that exhibit the same behavior.

#  grep . /sys/devices/cpu_core/events/*
/sys/devices/cpu_core/events/branch-instructions:event=0xc4
/sys/devices/cpu_core/events/branch-misses:event=0xc5
/sys/devices/cpu_core/events/bus-cycles:event=0x3c,umask=0x01
/sys/devices/cpu_core/events/cache-misses:event=0x2e,umask=0x41
/sys/devices/cpu_core/events/cache-references:event=0x2e,umask=0x4f
/sys/devices/cpu_core/events/cpu-cycles:event=0x3c
/sys/devices/cpu_core/events/instructions:event=0xc0
/sys/devices/cpu_core/events/mem-loads:event=0xcd,umask=0x1,ldlat=3
/sys/devices/cpu_core/events/mem-loads-aux:event=0x03,umask=0x82
/sys/devices/cpu_core/events/mem-stores:event=0xcd,umask=0x2
/sys/devices/cpu_core/events/ref-cycles:event=0x3c,umask=0x01
/sys/devices/cpu_core/events/slots:event=0x00,umask=0x4
/sys/devices/cpu_core/events/topdown-bad-spec:event=0x00,umask=0x81
/sys/devices/cpu_core/events/topdown-be-bound:event=0x00,umask=0x83
/sys/devices/cpu_core/events/topdown-br-mispredict:event=0x00,umask=0x85
/sys/devices/cpu_core/events/topdown-fe-bound:event=0x00,umask=0x82
/sys/devices/cpu_core/events/topdown-fetch-lat:event=0x00,umask=0x86
/sys/devices/cpu_core/events/topdown-heavy-ops:event=0x00,umask=0x84
/sys/devices/cpu_core/events/topdown-mem-bound:event=0x00,umask=0x87
/sys/devices/cpu_core/events/topdown-retiring:event=0x00,umask=0x80

# grep . /sys/devices/cpu_atom/events/*
/sys/devices/cpu_atom/events/branch-instructions:event=0xc4
/sys/devices/cpu_atom/events/branch-misses:event=0xc5
/sys/devices/cpu_atom/events/bus-cycles:event=0x3c,umask=0x01
/sys/devices/cpu_atom/events/cache-misses:event=0x2e,umask=0x41
/sys/devices/cpu_atom/events/cache-references:event=0x2e,umask=0x4f
/sys/devices/cpu_atom/events/cpu-cycles:event=0x3c
/sys/devices/cpu_atom/events/instructions:event=0xc0
grep: /sys/devices/cpu_atom/events/mem-loads: binary file matches
grep: /sys/devices/cpu_atom/events/mem-stores: binary file matches
/sys/devices/cpu_atom/events/ref-cycles:event=0x3c,umask=0x01
grep: /sys/devices/cpu_atom/events/topdown-bad-spec: binary file matches
grep: /sys/devices/cpu_atom/events/topdown-be-bound: binary file matches
grep: /sys/devices/cpu_atom/events/topdown-fe-bound: binary file matches
grep: /sys/devices/cpu_atom/events/topdown-retiring: binary file matches



On 4/13/26 9:22 PM, Mi, Dapeng1 wrote:
> It looks strange. Suppose cache-misses event doesn't need to assign the 
> offcore_rsp field. Could you please run below commands ?
> 
> grep . /sys/devices/cpu_core/events/*
> grep . /sys/devices/cpu_atom/events/*
> 
> BTW, which kernel did you use? I would find a ADL and check if it can be 
> reproduced. Thanks.
> 
> ------------------------------------------------------------------------
> *From:* David Arcari <darcari@redhat.com>
> *Sent:* Monday, April 13, 2026 7:53 PM
> *To:* Mi, Dapeng1 <dapeng1.mi@intel.com>; Len Brown <lenb@kernel.org>
> *Cc:* Linux PM list <linux-pm@vger.kernel.org>; Linux Kernel Mailing 
> List <linux-kernel@vger.kernel.org>
> *Subject:* Re: [PATCH] tools/power turbostat: Allow execution to 
> continue after perf_l2_init() failure
> 
> 
> Here is the -vvv output:
> 
> # sudo perf stat -e cache-misses -vvv sleep 1
> Control descriptor is not initialized
> Opening: cache-misses
> ------------------------------------------------------------
> perf_event_attr:
>     type                             10 (cpu_atom)
>     size                             144
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'ldlat' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
> unknown term 'offcore_rsp' for pmu 'cpu_atom' (valid terms:
> event,pc,edge,inv,umask,cmask,config,config1,config2,config3,config4,name,period,percore,metric-id,cpu)
>     config                           0x412e (cache-misses)
>     sample_type                      IDENTIFIER
>     read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
>     disabled                         1
>     inherit                          1
>     enable_on_exec                   1
> ------------------------------------------------------------
> sys_perf_event_open: pid 9255  cpu -1  group_fd -1  flags 0x8
> sys_perf_event_open failed, error -12
> Warning:
> skipping event cache-misses that kernel failed to open.
> The sys_perf_event_open() syscall failed for event (cache-misses):
> Cannot allocate memory
> "dmesg | grep -i perf" may provide additional information.
> 
> Opening: cache-misses
> ------------------------------------------------------------
> perf_event_attr:
>     type                             4 (cpu_core)
>     size                             144
>     config                           0x412e (cache-misses)
>     sample_type                      IDENTIFIER
>     read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
>     disabled                         1
>     inherit                          1
>     enable_on_exec                   1
> ------------------------------------------------------------
> sys_perf_event_open: pid 9255  cpu -1  group_fd -1  flags 0x8 = 3
> cache-misses: -1: 11224 321150 321150
> failed to read counter cache-misses
> cache-misses: 11224 321150 321150
> 
>    Performance counter stats for 'sleep 1':
> 
>      <not supported>      cpu_atom/cache-misses/
> 
>               11,224      cpu_core/cache-misses/
> 
> 
>          1.003110088 seconds time elapsed
> 
>          0.000000000 seconds user
>          0.000846000 seconds sys
> 
> 
> On 4/12/26 8:34 PM, Mi, Dapeng1 wrote:
>  > The most possible reason for the "<not supported>" is that the "sleep 1"
>  > process runs on a P-core where "cpu_atom/cache-misses/" can't be
>  > supported. It's expected.
>  >
>  > BTW, you can add "-vvv" option which gives more details like "sudo perf
>  > stat -e cache-misses -vvv sleep 1".
>  >
>  > Thanks.
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Len Brown <lenb@kernel.org>
>  > *Sent:* Saturday, April 11, 2026 2:09 AM
>  > *To:* Arcari, David <darcari@redhat.com>; Mi, Dapeng1 
> <dapeng1.mi@intel.com>
>  > *Cc:* Linux PM list <linux-pm@vger.kernel.org>; Linux Kernel Mailing
>  > List <linux-kernel@vger.kernel.org>
>  > *Subject:* Re: [PATCH] tools/power turbostat: Allow execution to
>  > continue after perf_l2_init() failure
>  >
>  > On Fri, Apr 10, 2026 at 12:06 PM David Arcari <darcari@redhat.com> wrote:
>  >
>  >  > I'm using a Fedora kernel:
>  >  >
>  >  > vmlinuz-7.0.0-0.rc4.260320g0e4f8f1a3d08.40.eln155.x86_64
>  >  >
>  >  > And turbostat is:
>  >  >
>  >  > # turbostat -v
>  >  > turbostat version 2026.02.14 - Len Brown <lenb@kernel.org>
>  >  >
>  >  > >
>  >  > > You can poke with "perf stat" as well, but this will depend on what
>  >  > > .json counter list is compiled into
>  >  > > your version of perf.
>  >  > >
>  >  > > probably a first sanity check would be if these commands for the LLC
>  >  > > and the L2 work:
>  >  > >
>  >  > > sudo perf stat -e cache-misses sleep 1
>  >  > > sudo perf stat -e L2_REQUEST.ALL sleep 1
>  >  >
>  >  > # sudo perf stat -e cache-misses sleep 1
>  >  >
>  >  >   Performance counter stats for 'sleep 1':
>  >  >
>  >  >     <not supported>      cpu_atom/cache-misses/
>  >
>  > I think this should work.  There may be an issue either with
>  > the perf utility or the perf kernel support on that system.
>  >
>  > I'll cc Dapeng.  Already the weekend where he is, but maybe he
>  > can give us some perf insight next week.
>  >
>  > thx,
>  > -Len
> 


      parent reply	other threads:[~2026-04-14 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 14:03 [PATCH] tools/power turbostat: Allow execution to continue after perf_l2_init() failure David Arcari
2026-04-09 19:13 ` Len Brown
2026-04-10 12:59   ` Len Brown
2026-04-10 16:06     ` David Arcari
2026-04-10 18:09       ` Len Brown
     [not found]         ` <MN0PR11MB6160DDF6952E2B595B2EA1C1CD242@MN0PR11MB6160.namprd11.prod.outlook.com>
2026-04-13 11:53           ` David Arcari
     [not found]             ` <MN0PR11MB61604669C6DF6D1F372108EACD252@MN0PR11MB6160.namprd11.prod.outlook.com>
2026-04-14 13:48               ` David Arcari [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=e6994ee6-328d-482e-bfac-907cea307ebb@redhat.com \
    --to=darcari@redhat.com \
    --cc=dapeng1.mi@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /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