[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 16/19] xen/cpufreq: introduce GET_CPUFREQ_CPPC sub-op
- To: Jan Beulich <jbeulich@xxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Thu, 24 Jul 2025 10:17:19 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=J+Gcat/R3lDUwKbGUxh6Wj/h1AAMKDVZEiB4szJdajA=; b=ouQHiWTIc6eXN+h6DyNtJfBAxiHizsSlV1s2wB0YAMo9+VImK+EvaZ2vi9YndZnczUUjAWByIfDNGKMoHo0wehxEGpOtOrMYEF9mr9TwcOhA4j4MoKV7Kn3vESq4BGP/+/3F7w0riR+IcIfXAJ67MIxaSWZ/BV3U/0hzHKnHJZVvZoCzU93CaMSsWl/Iwj9MJti09buo7dsK5pBjcOz5VpbJDNhiMnZpfTzsWdNvjZMeRpygyWc2ShuGUrygKVcC0IEuIf0EKeGstARZ7/liRUJJ4ndEGDYuE+/gyTKdZpo0NnHqxKKJMP0NbzZ0+8URBfYsPfJFDLKbexoe9Jg12g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vFUQwFP5v9J+yjHtNPIKTMGX9XzKfPKhEyLUzeEIy9Xrcw7BFKaFvXU4oIGUQ3Dp6/57Zj5P6JBO6L+p4VIitFN4c5SV7TmUQNifeyKTcqhaapORYw19sQsfnpz6ZxikD9jKXcTqueCdfuNjc04hNv+RfGRVCHXBtIoVhd0M/BYP9xlX/9MNFvqQvwXUGL39LvVjfpFPoZa5jn6UtPQ7A3uuFmdLxLEq6idjuewWNkPAXepuip19+6zjDSvp9r9RNpnx2sehQhUzYSWQeGfOHw4mGrdE06fy1nuupfLDfXPJDViUFB82/3A+JsAKUDtuRZB5ocRuc0oBk0L/cSlkIQ==
- Cc: <ray.huang@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Juergen Gross" <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Michal Orzel" <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 24 Jul 2025 14:17:28 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2025-07-24 09:31, Jan Beulich wrote:
On 11.07.2025 05:51, Penny Zheng wrote:
In amd-cppc passive mode, it's Xen governor which is responsible for
performance tuning, so governor and CPPC could co-exist. That is, both
governor-info and CPPC-info need to be printed together via xenpm tool.
If we tried to still put it in "struct xen_get_cpufreq_para" (e.g. just move
out of union), "struct xen_get_cpufreq_para" will enlarge too much to further
make xen_sysctl.u exceed 128 bytes.
So we introduce a new sub-op GET_CPUFREQ_CPPC to specifically print
CPPC-related para.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
void scaling_max_freq_func(int argc, char *argv[])
{
int cpuid = -1, freq = -1;
@@ -1576,6 +1622,7 @@ struct {
{ "get-cpufreq-average", cpufreq_func },
{ "start", start_gather_func },
{ "get-cpufreq-para", cpufreq_para_func },
+ { "get-cpufreq-cppc", cppc_para_func },
Didn't Jason also suggest that we would better not introduce a new command, but
rather make get-cpufreq-para invoke GET_CPUFREQ_CPPC as needed? Considering that
as per patch 15 the same information is already printed, I think I'm a little
lost with the need for this separate operation (and command), and then also with
the need for patch 15.
Yes, but I thought I was repeating your suggestion, Jan :)
xenpm's show_cpufreq_para_by_cpuid() would do something like:
show_cpufreq_para_by_cpuid() {
xc_get_cpufreq_para()
hw_auto = HWP || CPPC
if ( hw_auto ) {
xc_get_cppc_para()
print_cppc_para()
} else
print_cpufreq_para()
}
Would that work?
That way the single `xenpm get-cpufreq-para` would return the current
cpufreq data without the user needed to know what is running.
Regards,
Jason
|