From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: x86 Maintainers <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH v1] x86/sched: Print debug messages on hybrid asym capacity changes
Date: Wed, 09 Jul 2025 12:47:17 +0200 [thread overview]
Message-ID: <4664631.LvFx2qVVIh@rjwysocki.net> (raw)
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Subject: [PATCH v1] x86/sched: Print debug messages on hybrid asym capacity changes
Make arch_set_cpu_capacity() print a debug message including the
capacity and maximum frequency ratio used in scale-invariant utilization
computations for a given CPU and in capacity-aware scheduling (CAS) or
energy-aware scheduling (EAS).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
arch/x86/kernel/cpu/aperfmperf.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/arch/x86/kernel/cpu/aperfmperf.c
+++ b/arch/x86/kernel/cpu/aperfmperf.c
@@ -416,6 +416,10 @@
div_u64(cap << SCHED_CAPACITY_SHIFT, max_cap));
WRITE_ONCE(per_cpu_ptr(arch_cpu_scale, cpu)->freq_ratio,
div_u64(cap_freq << SCHED_CAPACITY_SHIFT, base_freq));
+
+ pr_debug("CPU%d: capacity = %lu, freq_ratio = %lu\n", cpu,
+ per_cpu_ptr(arch_cpu_scale, cpu)->capacity,
+ per_cpu_ptr(arch_cpu_scale, cpu)->freq_ratio);
} else {
WARN_ONCE(1, "Hybrid CPU capacity scaling not enabled");
}
next reply other threads:[~2025-07-09 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 10:47 Rafael J. Wysocki [this message]
2025-07-09 11:46 ` [PATCH v1] x86/sched: Print debug messages on hybrid asym capacity changes Peter Zijlstra
2025-07-09 12:02 ` Rafael J. Wysocki
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=4664631.LvFx2qVVIh@rjwysocki.net \
--to=rjw@rjwysocki.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=x86@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