[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: "Andryuk, Jason" <Jason.Andryuk@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Tue, 12 Aug 2025 10:15:22 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=186OmuKM0dwmAnPTdF+GVnnmSmDfln3vUvJCoDjFXHw=; b=wbkXGAUZez0IqMl2X3xOZ/6nRJoOH/q8AMwDpYP1u58fjyqsrntmRnHZF/c805pE6iwdNrvHL+1IIdefJ6Yrt0kzZdtlMULqxIwRBEjtjiqtaRPR23Yb34B7PO/FAXN9glbskQno2uIikiLWr2CZiKky4FsFr8/A/X+YiAA106fAWUoBZzBFUr+R0OMEvErK9TBHd9c65q0OKCsT77197X9lxrBVOD+7y4IygJei5vQ8UZEtHJU6/lWSL9s1wXQ4BHCsIgmAq4YxzXTpmzNX8HmkuECVdKNXKzE7NUEB3HI4THOnoiyWhAqzEPTpx25SKNADZRazqB5TKnBFMLXMjw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D6daDqX+AIr3HD4LW/lpkaOnl46X/ZOhTSKC96nhosuJRazhc0q9ua8EtVkiMx5/V+JNw/nxeDdU3KtDma29a3YmV5cTRITAx2PFX69+HnCZIDbCOYiTk3iusX0h5ce5m3y+YzoMYfqQHypMe5HAKcdd8vDF0b6ADcz/2DYpy79pmGT9pYDqWKPS3sc1DxtK8+pxRy59TY/7HZmTnv6kiMG8NZVBpq1QypqNQY4JisezN7koVNpCW0Drwhx4Ijno2BYWoQETsV3hUjToqAxllgrwP6gygTj+Sz9TpIXap/JUsXcCAyi3iK144zJCMhjxJzgJfRPdYbT8EoNBk4YhMA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Orzel, Michal" <Michal.Orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 12 Aug 2025 10:15:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Enabled=True;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SetDate=2025-08-12T10:15:07.0000000Z;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Name=Open Source;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ContentBits=3;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Method=Privileged
  • Thread-index: AQHb8hcsas/z4nFla0Oi87EUBsxHHbRBWmQAgAAMwYCAHZXsIA==
  • Thread-topic: [PATCH v6 16/19] xen/cpufreq: introduce GET_CPUFREQ_CPPC sub-op

[Public]

> -----Original Message-----
> From: Jason Andryuk <jason.andryuk@xxxxxxx>
> Sent: Thursday, July 24, 2025 10:17 PM
> To: Jan Beulich <jbeulich@xxxxxxxx>; Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Anthony PERARD
> <anthony.perard@xxxxxxxxxx>; Juergen Gross <jgross@xxxxxxxx>; Andrew
> Cooper <andrew.cooper3@xxxxxxxxxx>; Orzel, Michal <Michal.Orzel@xxxxxxx>;
> Julien Grall <julien@xxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx>;
> Stefano Stabellini <sstabellini@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v6 16/19] xen/cpufreq: introduce GET_CPUFREQ_CPPC
> sub-op
>
> 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?
>

Understood, I will re-write as you suggests, thx

> 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

 


Rackspace

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