From: "zhangpengjie (A)" <zhangpengjie2@huawei.com>
To: <lenb@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Zhanjie <zhanjie9@hisilicon.com>,
Zhenglifeng <zhenglifeng1@huawei.com>,
"lihuisong (C)" <lihuisong@h-partners.com>,
"yubowen (H)" <yubowen8@huawei.com>,
linhongye <linhongye@h-partners.com>,
Linuxarm <linuxarm@huawei.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"zhangpengjie (A)" <zhangpengjie2@huawei.com>,
"Wangzhi (ksana)" <wangzhi12@huawei.com>
Subject: turbostat: Incorrect physical unit for PL4
Date: Tue, 24 Feb 2026 11:25:02 +0800 [thread overview]
Message-ID: <f0cfd62f-9dcc-41e6-9193-2f32ec4b96e2@huawei.com> (raw)
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>
reply other threads:[~2026-02-24 3:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f0cfd62f-9dcc-41e6-9193-2f32ec4b96e2@huawei.com \
--to=zhangpengjie2@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=lihuisong@h-partners.com \
--cc=linhongye@h-partners.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=wangzhi12@huawei.com \
--cc=yubowen8@huawei.com \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.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
all inboxes | Powered by JetHome®