[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v6 08/19] xen/cpufreq: rename cppc preset name to "XEN_SYSCTL_CPPC_SET_PRESET_ONDEMAND"


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Fri, 11 Jul 2025 11:50:55 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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=ubB/KlIGq6E3CtD5EEmAgK0i67QpIoD721G22hmRCEM=; b=sDTbORHryntZsfY9DtT5X+jjqOxF/IoP2E/0ksozpVsfo/KCBQyYTWURFEMlqHHI5gU4Q/DN4mmHYS4LKSAUjaT0/cF3tTzX2be54VWSZ/JfOkQB61XLCReJqMxaquy+SeHK9bB2jKBszGS5OSsagTC/3j6YOdel8NQXilnTcBm8ib+RYh8wRwPMT5DMGXjUS+l6HRDH8NC3cDLu/w9xeeYHPOD3cIFX7/D0dNS9QKvn6fLBAJ8b+4yP3segNsQUYCLJkzoFA+lV3Jw8d2zzd13CtPoclb9U3DpauHo15CpT9epe5c37d/MNBCuBbMqm+ew7//nEldTLvKtTt+jYAg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PjLgsWB3erP2V7+2fORacX0qZig5tDvVpi5EDqPrQVYN+Z9OeL/gf82rUuidRbE7+heHx7XtJwjaMuEQ/TRzEx5eXhfI5tbCQ/3Ndc979BRZ9lm5rRsNsFGU+T+NFYAz6lh62HKM0IaBIzWvS4TcFTYrMszvGqD53HqYl7kiAhCorr7ycMZCY0Dnb4pxngzQzsX2CYtt3Vls/sRlovpgVcax7SwrCaLI2MTG1d3PtmWx5paKXJeMTNxfC1+9dSJxq2bhKgE3bnZ4ek6my0VlQzsvmSE293I2OFIYSRD/tlOZpNWE7XEguWn8LxbKDYtFNLxQiRqsNWiutzTVL0ETnw==
  • Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 11 Jul 2025 03:51:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

"ondemand" is more suitable to describe a preset in which epp value is set
with medium(CPPC_ENERGY_PERF_BALANCE), showing no preference over performance or
powersave, minimum with lowest and maximum with highest.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v5 -> v6:
- new commit
---
 tools/misc/xenpm.c              | 4 ++--
 xen/arch/x86/acpi/cpufreq/hwp.c | 2 +-
 xen/include/public/sysctl.h     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
index bbe45fa548..55b0b0c482 100644
--- a/tools/misc/xenpm.c
+++ b/tools/misc/xenpm.c
@@ -1445,9 +1445,9 @@ static int parse_cppc_opts(xc_set_cppc_para_t *set_cppc, 
int *cpuid,
         set_cppc->set_params = XEN_SYSCTL_CPPC_SET_PRESET_PERFORMANCE;
         i++;
     }
-    else if ( strcasecmp(argv[i], "balance") == 0 )
+    else if ( strcasecmp(argv[i], "ondemand") == 0 )
     {
-        set_cppc->set_params = XEN_SYSCTL_CPPC_SET_PRESET_BALANCE;
+        set_cppc->set_params = XEN_SYSCTL_CPPC_SET_PRESET_ONDEMAND;
         i++;
     }
 
diff --git a/xen/arch/x86/acpi/cpufreq/hwp.c b/xen/arch/x86/acpi/cpufreq/hwp.c
index 7bf475ecb5..cec2ee262e 100644
--- a/xen/arch/x86/acpi/cpufreq/hwp.c
+++ b/xen/arch/x86/acpi/cpufreq/hwp.c
@@ -610,7 +610,7 @@ int set_hwp_para(struct cpufreq_policy *policy,
         data->desired = 0;
         break;
 
-    case XEN_SYSCTL_CPPC_SET_PRESET_BALANCE:
+    case XEN_SYSCTL_CPPC_SET_PRESET_ONDEMAND:
         data->minimum = data->hw.lowest;
         data->maximum = data->hw.highest;
         data->activity_window = 0;
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index 86b6df30e7..aafa7fcf2b 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -430,7 +430,7 @@ struct xen_set_cppc_para {
 #define XEN_SYSCTL_CPPC_SET_ACT_WINDOW           (1U << 4)
 #define XEN_SYSCTL_CPPC_SET_PRESET_MASK          0xf0000000U
 #define XEN_SYSCTL_CPPC_SET_PRESET_NONE          0x00000000U
-#define XEN_SYSCTL_CPPC_SET_PRESET_BALANCE       0x10000000U
+#define XEN_SYSCTL_CPPC_SET_PRESET_ONDEMAND      0x10000000U
 #define XEN_SYSCTL_CPPC_SET_PRESET_POWERSAVE     0x20000000U
 #define XEN_SYSCTL_CPPC_SET_PRESET_PERFORMANCE   0x30000000U
 #define XEN_SYSCTL_CPPC_SET_PARAM_MASK \
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.