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

RE: [PATCH v8 8/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Wed, 3 Sep 2025 06:46:39 +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=g+bmyhh5rFnQXPoR57LllCgtHVYqY+F3Q8Ycl/WVPUU=; b=B23K2ZuurWYZf9Kmupazu1SyJ9lfJHcUyGb0miM5zAEI/lXg/Ut81xzZRmjKRIdOMBOtGz1pCtHsZys6TXBFwWr3gQvYR/ZlfLwKiryIi6/dEBF5BElQLk6gOZ9oOss8hu9ZSpheQIe3TP9W+LaNdOeuoRly8c23qo5WxuiF6aFFRHW2EBkH2lkFO+VLfa3jPlpDzhrdJ5fuMCVWP6v2U75zBV9NvxhZZvg6HjFXSHjURCgxFbLqKNoN9T68cU7HcAGbxWalnWETVNQaIVfw8RJCTFbFSLYJ8GSum5YkrpF7A8N4UjUIAXd186vuNH18g3WYZVGt9yU+bSrIYRDV5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BIYq2OW5mV/GkYcNzIEzxpIBXnFqCbAAcWUAOiF+eDXSWyCC08quilTHs9qdXdx38Pfjue6hbV9Bcdo71oRGHdOjD/yKNYvccDCw+tIdi+pw2AaxEGc/q5TJr24EnVrA44K7zIv89SulsIBMCBJ2UafCnSjZzRTqla/xaXHM6vvwA+VuPlB4NE2T5lAk4iPHdRiVN98vZpdltTENwogz8Tw5QkF3cTC2PxsiCiE2nAXt5Drzv9JK0ekUyQ26pl+zw9vld5j9udY2dFonjYKeeoYOPd2tIHJJqoWdkLrcRbSK/72XJkQ4CmK8XejpFWr0emT61pahFBMpUEHkY2PbmA==
  • 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>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andryuk, Jason" <Jason.Andryuk@xxxxxxx>
  • Delivery-date: Wed, 03 Sep 2025 06:47:01 +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-09-03T06:46:30.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: AQHcGANplGdEMGicVkezx0Fs9samVLR357kAgAjockCAADXaAIAABi1w
  • Thread-topic: [PATCH v8 8/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Wednesday, September 3, 2025 2:22 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Anthony PERARD
> <anthony.perard@xxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>;
> Roger Pau Monné <roger.pau@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> Andryuk, Jason <Jason.Andryuk@xxxxxxx>
> Subject: Re: [PATCH v8 8/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC
> xen_sysctl_pm_op for amd-cppc driver
>
> On 03.09.2025 05:14, Penny, Zheng wrote:
> > [Public]
> >
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: Thursday, August 28, 2025 7:07 PM
> >> To: Penny, Zheng <penny.zheng@xxxxxxx>
> >> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Anthony PERARD
> >> <anthony.perard@xxxxxxxxxx>; Andrew Cooper
> >> <andrew.cooper3@xxxxxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx>;
> >> xen-devel@xxxxxxxxxxxxxxxxxxxx
> >> Subject: Re: [PATCH v8 8/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC
> >> xen_sysctl_pm_op for amd-cppc driver
> >>
> >> On 28.08.2025 12:06, Penny Zheng wrote:
> >>> @@ -154,6 +156,17 @@ static int get_cpufreq_para(struct
> >>> xen_sysctl_pm_op
> >> *op)
> >>>      else
> >>>          strlcpy(op->u.get_para.scaling_driver, "Unknown",
> >>> CPUFREQ_NAME_LEN);
> >>>
> >>> +    /*
> >>> +     * In CPPC active mode, we are borrowing governor field to indicate
> >>> +     * policy info.
> >>> +     */
> >>> +    if ( policy->governor->name[0] )
> >>> +        strlcpy(op->u.get_para.u.s.scaling_governor,
> >>> +                policy->governor->name, CPUFREQ_NAME_LEN);
> >>> +    else
> >>> +        strlcpy(op->u.get_para.u.s.scaling_governor, "Unknown",
> >>> +                CPUFREQ_NAME_LEN);
> >>
> >> Isn't pulling this ...
> >>
> >>>      if ( !cpufreq_is_governorless(op->cpuid) )
> >>>      {
> >>>          if ( !(scaling_available_governors =
> >>
> >> ... out of this if()'s body going to affect HWP? It's not clear to me
> >> whether that would be entirely benign.
> >
> > HWP has its own unique "hwp" governor. So, imo, it may not affect.
>
> How does it matter what (unique or not) governor it uses? The relevant aspect 
> (to
> me) is the !cpufreq_is_governorless() check that previously guarded the 
> copying
> of the name. (It would be another thing if this was benign to HWP, but such 
> would
> need clarifying in the description. Cc-ing Jason just in case.)

Sorry, What I mean is that HWP do have a governor, so such copying of the name 
shall be benign to the HWP. I'll clarify it in the description

>
> Jan

 


Rackspace

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