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

Re: [PATCH v5 05/18] xen/cpufreq: refactor cmdline "cpufreq=xxx"


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 11 Jun 2025 04:02:58 -0400
  • 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=hSoUs/q3sJbHxSpapxW5i35H3PX490J21YMC+giLGeM=; b=lu8ro5mwzhQGJ5gCOJ3/vjgJvJuHAx2iAsBaXjjzw25hzEundopz1v913YebmXJWmgJIPlSlm2lmbcOgrWb45Pkw2yg6g1piRmMGRYOlvskEeZQoyIQ7C61US2MazwyjKllInLuTpCqxpYRoMbh/lB6qGuU+93J3F0kjMW2i16NEh+FqTJWgCyPzoHZy615McTysYz44Ykge3GAknB3xH3RSn8HZA3biqqtgOqbIkVNOKEdIs01I8PjUa6rb/vkod3Uqysuj7t+KJU0+QvAq3z4GnlPQ67R7syuIsiewST2Tzvh76Nm8obFuNalw8PKHvTHOVTI8C7Gs/QFuPkwjBA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SgEDVXdkh4EuvdcXFy2dY2FlYFRf/eMi0QoAbLr6Yjj6JJszGdCh0rPGqTVDFtHuO2Kp8f0fbjkWfGeXcxZKuC7xTJWZvaY+Lxw6jDQWtoecuGK4FxrHtxgmqyPj9LO8/xaDa8S+FNuB8EYByF0KO3+FhJpS1pnIsZ12TgYfWcTDpl9DceB8CJnFmAEQOljb2vP746tOJbqPfCiaafs2cFR9ebMttqPZhmkIBGv9vP4tx/+skNgA1UijuC0Z7VHaom3OA7+91kBsdUeyictCfNz6hN5AZxKpw3D5M4NN7n28cQdmYCFWkXP9X65hJTUH1w5qPVFOw/TkH9UPDCZlgw==
  • Cc: <ray.huang@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 11 Jun 2025 20:42:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Penny,

On 2025-05-27 04:48, Penny Zheng wrote:
A helper function handle_cpufreq_cmdline() is introduced to tidy different
handling pathes.
We also add a new helper cpufreq_opts_contain() to ignore and warn user
redundant setting, like "cpufreq=hwp;hwp;xen"

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>

@@ -114,20 +161,14 @@ static int __init cf_check setup_cpufreq_option(const 
char *str)
if ( choice > 0 || !cmdline_strcmp(str, "xen") )
          {
-            xen_processor_pmbits |= XEN_PROCESSOR_PM_PX;
-            cpufreq_controller = FREQCTL_xen;
-            cpufreq_xen_opts[cpufreq_xen_cnt++] = CPUFREQ_xen;
-            ret = 0;
+            ret = handle_cpufreq_cmdline(CPUFREQ_xen);

Do we need to check ret and error out?  (and below)

Thanks,
Jason

              if ( arg[0] && arg[1] )
                  ret = cpufreq_cmdline_parse(arg + 1, end);
          }
          else if ( IS_ENABLED(CONFIG_INTEL) && choice < 0 &&
                    !cmdline_strcmp(str, "hwp") )
          {
-            xen_processor_pmbits |= XEN_PROCESSOR_PM_PX;
-            cpufreq_controller = FREQCTL_xen;
-            cpufreq_xen_opts[cpufreq_xen_cnt++] = CPUFREQ_hwp;
-            ret = 0;
+            ret = handle_cpufreq_cmdline(CPUFREQ_hwp);
              if ( arg[0] && arg[1] )
                  ret = hwp_cmdline_parse(arg + 1, end);
          }




 


Rackspace

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