Skip to contentSkip to conversation

Why do I sometimes "lose" the "psys" RAPL counter?

DISCUSSION Srinivas Pandruvada 2 participants 4 messages Mar 26, 2020 – Mar 27, 2020 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Kenneth R. Crudup

I'm assuming by now you've seen the other emails fully answering yours and Zhang's questions?

I tried on the Dell 7390 2-in-1 and see the behavior you reported. The problem is that the energy counter is 0 during probe (msr 0x64d is 0), which is not correct. So you rmmod intel_rapl_msr and modprobe again, you will see psys domain.
Even the counter values are not correct. The delta between two reads of energy_uj is less than the package domain energy_uj delta. So psys domain is not useful on this system.

Sent again as the original email was not plain text.

Thanks,
Srinivas

Quoted 159 lines
Signature · 11 lines
-- 
Sent from my Tab S4


-------- Original message --------
From: Srinivas Pandruvada <[email protected]>
Date: 3/26/20 08:23 (GMT-08:00)
To: "Rafael J. Wysocki" <[email protected]>, "Kenneth R. Crudup" <
[email protected]>
Cc: Linux PM <[email protected]>
Subject: Re: Why do I sometimes "lose" the "psys" RAPL counter?
Quoted 8 lines · Rafael J. Wysocki

+Srinivas

Quoted 4 lines · Kenneth R. Crudup

(Re-sent, as I think I had the wrong mailing list address before)

I'm running Linus' latest master of today (and have seen this for

a

Quoted 2 lines
Quoted 2 lines

while
now). I've got an IceLake CPU (i7-1065G7 running on a Dell 7390

2-

Quoted 5 lines
Quoted 5 lines

in-1, but
I'm pretty sure I've seen issue this on my HP Spectre 13 with a 9th-gen CPU).

Sometimes when I boot, I get 4 RAPL "fixed counters" and

sometimes

Quoted 4 lines
Quoted 4 lines

I only
get 3, and it's always the "psys" domain that's missing when it does. See
attached output from various dmesg runs (and a snippet below).

When you say counters, where is this missing from:
1. /sys/class/powercap/intel-rapl/intel-rapl:1
2. /sys/bus/event_source/devices/power/events/
3. Both of the above folders

Also what do you see?
rdmsr 0x65c
rdmsr 0x64d

Thanks,
Srinivas

Quoted 8 lines
Quoted 8 lines

Is this a bug?
Do you know what may cause this?

If you need more info to help me help you guys with this (if it's truly an
issue), please let me know.

Quoted 6 lines
Quoted 6 lines

Thanks,

-Kenny

----

Mar 22 05:02:48 xps-7390 kernel: [    0.756890] RAPL PMU: API

unit

Quoted 8 lines
Quoted 8 lines

is 2^-32 Joules, 3 fixed counters, 655360 ms ovfl timer

Mar 22 05:02:48 xps-7390 kernel: [    0.756892] RAPL PMU: hw unit
of domain pp0-core 2^-14 Joules
Mar 22 05:02:48 xps-7390 kernel: [    0.756893] RAPL PMU: hw unit
of domain package 2^-14 Joules
Mar 22 05:02:48 xps-7390 kernel: [    0.756894] RAPL PMU: hw unit
of domain pp1-gpu 2^-14 Joules
Mar 22 05:02:48 xps-7390 kernel: [    2.178267]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:02:48 xps-7390 kernel: [    3.056499]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:02:48 xps-7390 kernel: [    3.058417]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain core

Mar 22 05:02:48 xps-7390 kernel: [    3.062290]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain uncore

Mar 22 05:17:50 xps-7390 kernel: [    1.770794] RAPL PMU: API

unit

Quoted 8 lines
Quoted 8 lines

is 2^-32 Joules, 3 fixed counters, 655360 ms ovfl timer

Mar 22 05:17:50 xps-7390 kernel: [    1.770799] RAPL PMU: hw unit
of domain pp0-core 2^-14 Joules
Mar 22 05:17:50 xps-7390 kernel: [    1.770802] RAPL PMU: hw unit
of domain package 2^-14 Joules
Mar 22 05:17:50 xps-7390 kernel: [    1.770814] RAPL PMU: hw unit
of domain pp1-gpu 2^-14 Joules
Mar 22 05:17:50 xps-7390 kernel: [    3.176324]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:17:50 xps-7390 kernel: [    4.060045]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:17:50 xps-7390 kernel: [    4.061739]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain core

Mar 22 05:17:50 xps-7390 kernel: [    4.063129]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain uncore

Mar 22 05:28:05 xps-7390 kernel: [    1.770320] RAPL PMU: API

unit

Quoted 10 lines
Quoted 10 lines

is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer

Mar 22 05:28:05 xps-7390 kernel: [    1.770326] RAPL PMU: hw unit
of domain pp0-core 2^-14 Joules
Mar 22 05:28:05 xps-7390 kernel: [    1.770329] RAPL PMU: hw unit
of domain package 2^-14 Joules
Mar 22 05:28:05 xps-7390 kernel: [    1.770332] RAPL PMU: hw unit
of domain pp1-gpu 2^-14 Joules
Mar 22 05:28:05 xps-7390 kernel: [    1.770335] RAPL PMU: hw unit
of domain psys 2^-14 Joules
Mar 22 05:28:05 xps-7390 kernel: [    3.148050]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:28:05 xps-7390 kernel: [    4.043621]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:28:05 xps-7390 kernel: [    4.045295]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain core

Mar 22 05:28:05 xps-7390 kernel: [    4.046823]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain uncore

Mar 22 05:37:11 xps-7390 kernel: [    1.635660] RAPL PMU: API

unit

Quoted 10 lines
Quoted 10 lines

is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer

Mar 22 05:37:11 xps-7390 kernel: [    1.635667] RAPL PMU: hw unit
of domain pp0-core 2^-14 Joules
Mar 22 05:37:11 xps-7390 kernel: [    1.635670] RAPL PMU: hw unit
of domain package 2^-14 Joules
Mar 22 05:37:11 xps-7390 kernel: [    1.635673] RAPL PMU: hw unit
of domain pp1-gpu 2^-14 Joules
Mar 22 05:37:11 xps-7390 kernel: [    1.635676] RAPL PMU: hw unit
of domain psys 2^-14 Joules
Mar 22 05:37:11 xps-7390 kernel: [    3.043397]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:37:11 xps-7390 kernel: [    4.043265]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain package

Mar 22 05:37:11 xps-7390 kernel: [    4.045524]

intel_rapl_common:

Quoted 2 lines
Quoted 2 lines

Found RAPL domain core

Mar 22 05:37:11 xps-7390 kernel: [    4.048153]

intel_rapl_common:

Quoted 7 lines
Quoted 7 lines

Found RAPL domain uncore
----

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Silicon Valley

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.21.2003261303530.3213@xps-7390

#3 lore raw
Quoted 30 lines · Kenneth R. Crudup
Quoted 1 line · Srinivas Pandruvada

I tried on the Dell 7390 2-in-1 and see the behavior you reported.

Thanks for that (and glad to see my specific system is available to you!)

Quoted 3 lines

The problem is that the energy counter is 0 during probe (msr 0x64d is
0), which is not correct.

Any insight as to why this only happens during a reboot (vs. cold boot)?

Quoted 3 lines

Even the counter values are not correct. The delta between two reads of
energy_uj is less than the package domain energy_uj delta.

...

Quoted 1 line

So psys domain is not useful on this system.

So, If I understand you correctly, even when I can see the psys domain, the
values aren't useful?

I trust your conclusion, but I have a tool called "S-Tui" deployed on my
machine and when the psys domain is active, I get what apears to be moving
values depending on system load. (See attachment.)

Quoted 11 lines

I may also be asking the wrong question, too- perhaps "What do I lose by
not having a working psys domain?" (or conversely, "What do I gain by having
one available?") is what I should be asking; I'm trying to do whatever I can
to manage thermals on this machine, mostly 'cause with a 15W tDp and my
typical build workload I seem to throttle quite a bit (not uncommon for my
machine's ultrabook form factor, though).

You will not loose anything if you don't have psys domain. What disto you are using? Check thermald version (Some distros star this by default like Ubuntu)
thermald --version

Run this tool once on your system
https://github.com/intel/dptfxtract

Thanks,
Srinivas

Quoted 5 lines

Thanks,

-Kenny

#4 lore raw
Quoted 1 line · Srinivas Pandruvada

You will not loose anything if you don't have psys domain.

OK. I think a BIOS update from HP that just came thru yesterday seems to have fixed this issue, BTW.

Quoted 1 line

What distro you are using?

Kubuntu 19.10 (but I build my own kernels from Linus' master since I have an IceLake CPU).

Quoted 1 line

Check thermald version (Some distros star this by

I disabled thermald a while ago; it goes overboard and slows me down too much.

Quoted 2 lines

Run this tool once on your system
https://github.com/intel/dptfxtract

I did that a while ago (back when I was using thermald) and have a bunch of entries in /etc/thermald/... ; but as I'm no longer using thermald is this relevant for me? What should I look for?

-Kenny

Signature · 1 line
Kenneth R. Crudup  Sr. SW Engineer, Scott County Consulting, Silicon Valley
#5 lore raw
Quoted 19 lines · Kenneth R. Crudup
Quoted 1 line · Srinivas Pandruvada

You will not loose anything if you don't have psys domain.

OK. I think a BIOS update from HP that just came thru yesterday seems to
have fixed this issue, BTW.

Quoted 1 line

What distro you are using?

Kubuntu 19.10 (but I build my own kernels from Linus' master since I have
an IceLake CPU).

Quoted 1 line

Check thermald version (Some distros star this by

I disabled thermald a while ago; it goes overboard and slows me down too much.

Quoted 8 lines
Quoted 2 lines

Run this tool once on your system
https://github.com/intel/dptfxtract

I did that a while ago (back when I was using thermald) and have a bunch of
entries in /etc/thermald/... ; but as I'm no longer using thermald is this
relevant for me? What should I look for?

In some platform to set the correct power settings and then control thermal when there is an issue.

Thanks,
Srinivas

Quoted 3 lines

-Kenny