From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Kenneth Crudup <kenny@panix.com>,
"Zhang, Rui" <rui.zhang@intel.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: Sometimes I only see 3 RAPL (out of 4) Counters
Date: Thu, 11 Sep 2025 11:37:59 -0700 [thread overview]
Message-ID: <b88dc0fc6604bd18d1658c0d16aa10a2f43eb054.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0i4gNcir8sDunPbpSP367tN=PvrsrP61puv954XEtMBKQ@mail.gmail.com>
On Thu, 2025-09-11 at 11:42 +0200, Rafael J. Wysocki wrote:
> +Srinivas & Rui
>
> On Thu, Sep 11, 2025 at 2:20 AM Kenneth Crudup <kenny@panix.com>
> wrote:
> >
> > I have a Dell XPS-9320, with a i7-1280P (family: 0x6, model: 0x9a,
> > stepping: 0x3) CPU. Sometimes I'll only see 3 RAPL counters instead
> > of
> > the normal 4. (It used to happen a lot more often, BTW):
> >
That is because sometimes the counter for PP1 (GFX ..) is 0 during boot
and then the PMU code will ignore that. This happens when the counter
is sampled before GPU is not even started. So this is a race condition.
Thanks,
Srinivas
> > ----
> > gunzip --force --stdout /var/log/syslog* | fgrep -i rapl | fgrep
> > fixed
> > 2025-09-08T12:09:05.915989-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 3 fixed counters, 655360 ms ovfl timer
> > 2025-09-09T08:52:19.098522-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-09T17:25:24.377784-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-09T17:50:09.334140-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-10T16:42:13.259270-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 3 fixed counters, 655360 ms ovfl timer
> > 2025-09-10T16:46:36.322016-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-02T13:05:02.632218-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-02T14:07:19.683466-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-02T14:20:43.602483-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-04T13:13:38.636326-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-09-05T09:21:50.147180-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-29T10:57:14.419740-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-17T11:52:55.733943-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-19T07:52:30.696326-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-19T07:55:49.083600-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-20T10:53:54.601680-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-20T11:00:09.560496-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > 2025-08-20T11:12:30.580414-07:00 xps-9320 kernel: [ T1] RAPL
> > PMU: API
> > unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
> > ----
> >
> > ... and it's always(?) the GPU RAPL:
> >
> > ----
> > gunzip --force --stdout /var/log/syslog* | fgrep -i rapl | cut -d\]
> > -f2-
> > > sort -f | uniq -c
> > grep: (standard input): binary file matches
> > 18 intel_rapl_common: Found RAPL domain core
> > 36 intel_rapl_common: Found RAPL domain package
> > 18 intel_rapl_common: Found RAPL domain psys
> > 16 intel_rapl_common: Found RAPL domain uncore
> > 18 intel_rapl_msr: PL4 support detected.
> > 2 RAPL PMU: API unit is 2^-32 Joules, 3 fixed counters,
> > 655360
> > ms ovfl timer
> > 16 RAPL PMU: API unit is 2^-32 Joules, 4 fixed counters,
> > 655360
> > ms ovfl timer
> > 18 RAPL PMU: hw unit of domain package 2^-14 Joules
> > 18 RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
> > 16 RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
> > 18 RAPL PMU: hw unit of domain psys 2^-14 Joules
> > ----
> >
> > A reboot fixes it up again (and that's if I even notice), but what
> > would
> > cause this to happen? What's the effect of it missing the RAPL
> > counter, BTW?
> >
> > LMK if you need more info,
> >
> > -Kenny
> >
> > --
> > Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting,
> > Orange
> > County CA
> >
> >
next prev parent reply other threads:[~2025-09-11 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 0:20 Sometimes I only see 3 RAPL (out of 4) Counters Kenneth Crudup
2025-09-11 9:42 ` Rafael J. Wysocki
2025-09-11 18:37 ` srinivas pandruvada [this message]
2025-09-11 18:40 ` Kenneth Crudup
2025-09-11 20:11 ` srinivas pandruvada
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=b88dc0fc6604bd18d1658c0d16aa10a2f43eb054.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=kenny@panix.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@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