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

RE: [PATCH v6 18/19] xen/cpufreq: bypass governor-related para for amd-cppc-epp


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Wed, 13 Aug 2025 06:57:37 +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=8kDTXgM8GZivn5Y9y/bNB7Cufnd+AjJNEpY88AC5abU=; b=Rt/bXjSL8cUFFs9lO8w7XJDiJBs6gZZITotfD0MVmlB3jrioaZXwQSwiwuu5xoqE/b1mPPKcSVKlx2tmpBEZchYbfIRF2MpL6uficgotnfalXlKJ5WNO7P4AUG0ga+qH3JoAjvDFgC0JHbwAyjRtLqzob64iGJOogrldKKqLhAKb4sBeBWgWo4an8BNHK+f2PVBGVQf/B9dGjyhJf82bUjO1CQp5xlQmqf2GPh+fcqRooKABCzXGEu28LNXQozQiRFpgxKlBXZ2yImwPVYBDeb3mFgoDFOCPGH9wm7+m6nfcNYXIaa72m8kBLHWAGbiHYPpWIRgc8jL4uz0nxDHnPg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ICQGebgDJvOjG5ysFt1OlbD8X2kX0EitGMF7+ZghfCBStymfqnN04hO/SDh/gol44d6KWLf3jWtX9bSlWmlc+tdOEmc004MkxW1mHrUgq1ueZl56His1doCXRqVScDWktDmeSaNAdX+xeVs8MI9o9lUaxMvKxSKZ7OVqswwVxeuHEU+39f/RLBpipOOSpww/cFjXQmhHUPxoww9nUAVHds0txyRHrBuU4huhp6awFZY2OLD4nJ9/zAE3iXNV5GVyvdwJam+yPGqBQJW/t92KZapUjkuajtHBGwcmt0jnqI1Hiwgp/+TuBMhtTOnwOeNA7e/qYGfDo/Kzs/V7RkfUmA==
  • 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>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 13 Aug 2025 06:58:10 +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-13T06:57:25.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: AQHb8hct870Jb7Op80yNICw04pKwJbRBZNiAgB7l0+A=
  • Thread-topic: [PATCH v6 18/19] xen/cpufreq: bypass governor-related para for amd-cppc-epp

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Thursday, July 24, 2025 10:09 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Anthony PERARD
> <anthony.perard@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v6 18/19] xen/cpufreq: bypass governor-related para for 
> amd-
> cppc-epp
>
> On 11.07.2025 05:51, Penny Zheng wrote:
> > --- a/xen/drivers/cpufreq/cpufreq.c
> > +++ b/xen/drivers/cpufreq/cpufreq.c
> > @@ -968,3 +968,9 @@ bool cpufreq_in_cppc_passive_mode(unsigned int cpuid)
> >      return processor_pminfo[cpuid]->init & XEN_CPPC_INIT &&
> >             cpufreq_driver.target;
> >  }
> > +
> > +bool cpufreq_is_governorless(unsigned int cpuid) {
> > +    return processor_pminfo[cpuid]->init && (hwp_active() ||
> > +
> > +cpufreq_driver.setpolicy); }
>
> The function, by its name, is seemingly generic, yet its implementation is 
> tailored to
> the HWP and CPPC drivers. I think such needs calling out in a comment.
>
> Seeing the XEN_CPPC_INIT check in context, I also wonder why here you check
> for ->init just being non-zero.
>

Checking ->init being non-zero is to ensure that cpufreq core is initialized 
successfully, no matter Px mode or CPPC mode.
As non-zero cpufreq_driver.setpolicy callback could only verify that registered 
cpufreq driver is governorless.
Maybe I shall add comments to explain

> Jan

 


Rackspace

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