public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Len Brown <lenb@kernel.org>, Justin Ernst <justin.ernst@hpe.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Justin Ernst <justin.ernst@hpe.com>
Subject: Re: [PATCH] tools/power/turbostat: Fix uncore frequency file string
Date: Fri, 22 Mar 2024 13:38:02 +0100	[thread overview]
Message-ID: <1980117.DIVbhacDa7@work.fritz.box> (raw)
In-Reply-To: <20240308204957.2007212-1-justin.ernst@hpe.com>

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On Freitag, 8. März 2024 21:49:57 CET Justin Ernst wrote:
> Running turbostat on a 16 socket HPE Scale-up Compute 3200 (SapphireRapids)
> fails with: turbostat:
> /sys/devices/system/cpu/intel_uncore_frequency/package_010_die_00/current_f
> req_khz: open failed: No such file or directory
> 
> We observe the sysfs uncore frequency directories named:
> ...
> package_09_die_00/
> package_10_die_00/
> package_11_die_00/
> ...
> package_15_die_00/
> 
> The culprit is an incorrect sprintf format string "package_0%d_die_0%d" used
> with each instance of reading uncore frequency files.
> uncore-frequency-common.c creates the sysfs directory with the format
> "package_%02d_die_%02d". Once the package value reaches double digits, the
> formats diverge.
Yep, currently in:
drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
line 238.

Looks like the proper bugfix.
 
> Change each instance of "package_0%d_die_0%d" to "package_%02d_die_%02d".
> 
> Signed-off-by: Justin Ernst <justin.ernst@hpe.com>

Reviewed-by: Thomas Renninger <trenn@suse.de>

       Thomas

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-03-22 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 20:49 [PATCH] tools/power/turbostat: Fix uncore frequency file string Justin Ernst
2024-03-22 12:38 ` Thomas Renninger [this message]
2024-04-02 17:45 ` Len Brown
2024-04-02 18:57   ` Ernst, Justin

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=1980117.DIVbhacDa7@work.fritz.box \
    --to=trenn@suse.de \
    --cc=justin.ernst@hpe.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