mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* turbostat: Incorrect physical unit for PL4
@ 2026-02-24  3:25 zhangpengjie (A)
  0 siblings, 0 replies; only message in thread
From: zhangpengjie (A) @ 2026-02-24  3:25 UTC (permalink / raw)
  To: lenb
  Cc: linux-pm, linux-kernel, Zhanjie, Zhenglifeng, lihuisong (C),
	yubowen (H),
	linhongye, Linuxarm, Jonathan Cameron, zhangpengjie (A),
	Wangzhi (ksana)

Hi Len and linux-pm community, I was reviewing the PL4 output in turbostat
and noticed a confusing behavior regarding its physical unit.

According to Intel's hardware specifications, there is a contradiction in
the documentation itself:The overview describes it as: "Package-level
maximum power limit (in Watts). It is a proactive, instantaneous limit."
However, the actual bitfield definition states: "The PL4 value in bits
[12:0] is specified in strict 0.125 A increments."

Currently, in tools/power/x86/turbostat/turbostat.c, the code parses it 
as follows:

fprintf(outf, "cpu%d: PKG Limit #4: %f Watts (%slocked)\n", cpu, ((msr 
 >> 0) & 0x1FFF) * rapl_power_units, (msr >> 31) & 1 ? "" : "UN");

There is a significant issue here:
Because the manual broadly labels PL4 in "Watts", turbostat incorrectly
multiplies the raw Ampere value by rapl_power_units and displays the result
as "Watts". As a result, the tool outputs a PL4 value that is often 
absurdly
lower than the PL1 and PL2 values. Since PL4 is supposed to be the absolute
maximum instantaneous limit, displaying it as a value smaller than PL1/PL2
causes significant confusion for users monitoring system power.

Could you please take a look at this and consider clarifying the output
to reflect the actual Amps?

Best regards,

Pengjie Zhang <zhangpengjie2@huawei.com>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-24  3:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-24  3:25 turbostat: Incorrect physical unit for PL4 zhangpengjie (A)

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®