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

[PATCH v5 07/18] xen/cpufreq: disable px statistic info in amd-cppc mode


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Tue, 27 May 2025 16:48:22 +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=93mFFL37UWEreuoxsuCgjzGv/0KWiWMS2KGPmS4EzyY=; b=Br9KoLFEX/Wf5n92tFkIsK9UPqaBogzFgYYaHT96hDnb5i6woXHdvZVDLsfla56rgqeXAI0ZprEIWC9LNXh7kDMvG3aBJLFSuULob0X4WHk4UjsBj/jjxHvygWA7HqhrUJUCdfPG2AUNqaI0TPZkoNVQ1BePu8sL0dkCNHwGMRxKz/pl2xinHdE7BYhPMZsAz61Vn9Ya2tKDeO6aCu+oieNWTrCLXPoxRjbGeUFnoRKaKcS8YpUSW6Ud6VVKW5oHNkbbxAp9kDfB1ZS4eJfRaQKhnXsD/pyi194CZEKTlYY9kCRIgGPirePllVxZlowNgX3c/KeeE/TB5y6IGysUwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HQJuWyfgUcSW5EWmCEOpawdrIcmRWaw44IlnMO/acLFqL150kFStkvIyrIMzLagvVUl10uLnpWIQTFn32ShuYOgQDyZAe33JfCuaxz6rTJQuxd7mZO8bBd9gauwWnz74HE/0OAxi1AmrVrX/yo2/nlFPorJvW4TyRc9PRFrdFRfgjvyYGkNYaAqjrBo0cgZjI7ujoL8iQV6+d5sroEzVjJflUcg/7E4Vdj8Viz8dKezQhoSn6eCP+Pee3QUiMSyzqBve/T6bPWOiRn1AwS6gMkg/q6eHPSwTOEFQwWMvcVIUslWxLEQtB6Qk0+M6ukGqhH5549EmgGrTTUnJ5mLf/Q==
  • Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Tue, 27 May 2025 08:49:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We want to bypass construction of px statistic info, while not bypassing
cpufreq_statistic_lock initialization for a good reason, in
cpufreq_statistic_init() for amd-cppc mode, as P-states is not necessary there.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v3 -> v4:
- remove unnecessary stub for cpufreq_statistic_exit()
---
v4 -> v5:
- refactor commit message
---
 xen/drivers/cpufreq/utility.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/drivers/cpufreq/utility.c b/xen/drivers/cpufreq/utility.c
index e690a484f1..b35e2eb1b6 100644
--- a/xen/drivers/cpufreq/utility.c
+++ b/xen/drivers/cpufreq/utility.c
@@ -98,6 +98,9 @@ int cpufreq_statistic_init(unsigned int cpu)
     if ( !pmpt )
         return -EINVAL;
 
+    if ( !(pmpt->init & XEN_PX_INIT) )
+        return 0;
+
     spin_lock(cpufreq_statistic_lock);
 
     pxpt = per_cpu(cpufreq_statistic_data, cpu);
-- 
2.34.1




 


Rackspace

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