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: Mon, 13 Apr 2026 07:53:41 -0400	[thread overview]
Message-ID: <bdc53af9-ca09-4f32-80fb-4288775853b1@redhat.com> (raw)
In-Reply-To: <MN0PR11MB6160DDF6952E2B595B2EA1C1CD242@MN0PR11MB6160.namprd11.prod.outlook.com>


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-13 11:53 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 [this message]
     [not found]             ` <MN0PR11MB61604669C6DF6D1F372108EACD252@MN0PR11MB6160.namprd11.prod.outlook.com>
2026-04-14 13:48               ` David Arcari

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=bdc53af9-ca09-4f32-80fb-4288775853b1@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