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

RE: [PATCH v2 04/11] xen/amd: export processor max frequency value


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Tue, 18 Feb 2025 06:14:42 +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=wxH0xjDRCXo+RkHkPD0VXhNICaq8v8E5tNH8xWmGRWQ=; b=uOSxRrsSo/VH1BZQotktfk1u+yol6CywTRapOAiGJG/F5eZEizKkhskmXd71ONyOfGG4var/K71aoDhpGNapWLCCg+46YXcD7GlcTQ8gOa6otCtSnVJU+Rw8FR78NgxzhOdSKHs0omUGT5KRtkRgeYR/JtR8wsBIj/9jho5KwZ0VpXQR6iTquckI6Ck0dNgLt0BDSlk1OR2n2QhWAdJ52k5iFiiFgcGXnNoUuhUGYMs9Fx/j0YPc4JS5RY6c56zbhhgi0mviNghZHzOPInphhf4XfgPWPjZfR16so9Pg0GDzJIMISRgYp6a2OvKYkgLeIOiTGBqAQCMfwoOyXNwUAw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qg9p7xukCDPK5q35Dj12lgP4MlKPiqkIJcGPAlll1LqLpgX3wLzZ1D7FfJfpGEQg0vQ+5F7d1fjGoYWo/dLkfRgboZFUvYwtrMU1gVjQ6OyGyBociwFMj9UxMQPf/Zubm+2Xvp/kGTTEJk5w8qq/zlNkOtaMcvYDS5NmxrjAN8yzK/gi2nTZiT9HGBPTT+50ijPzmm+82V0W97dOe5K5cLXvWlaw11DUv2kopkjR9LDWWEcecZ+qrkvpOpnUTGLVLAjvb0YHe/P4Rv9Zs9vyvAGwWAqcDJJ/7yKRNtntKqRs53eLpJM4bTQUnJPW9z8kra9g5pvzvSJQY6sRv4HahQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, "Andryuk, Jason" <Jason.Andryuk@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Feb 2025 06:14:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ActionId=b752dbff-f84a-4445-abea-2c00795a0ae1;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ContentBits=0;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Enabled=true;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Method=Standard;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Name=AMD Internal Distribution Only;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SetDate=2025-02-18T06:05:44Z;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Tag=10, 3, 0, 1;
  • Thread-index: AQHbeHHNz+yPLcfmW0WrRfgDeQNp47NCKNYAgAp8kWA=
  • Thread-topic: [PATCH v2 04/11] xen/amd: export processor max frequency value

[AMD Official Use Only - AMD Internal Distribution Only]

Hi,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Tuesday, February 11, 2025 9:57 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Andryuk, Jason
> <Jason.Andryuk@xxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>;
> Roger Pau Monné <roger.pau@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 04/11] xen/amd: export processor max frequency value
>
> On 06.02.2025 09:32, Penny Zheng wrote:
> > --- a/xen/arch/x86/cpu/amd.c
> > +++ b/xen/arch/x86/cpu/amd.c
> > @@ -56,6 +56,8 @@ bool __initdata amd_virt_spec_ctrl;
> >
> >  static bool __read_mostly fam17_c6_disabled;
> >
> > +DEFINE_PER_CPU_READ_MOSTLY(uint64_t, max_freq_mhz);
>
> Such an AMD-only variable would better have an amd_ prefix.
>
> > @@ -669,7 +671,12 @@ void amd_log_freq(const struct cpuinfo_x86 *c)
> >             printk("CPU%u: %lu ... %lu MHz\n",
> >                    smp_processor_id(), FREQ(lo), FREQ(hi));
> >     else
> > +   {
> >             printk("CPU%u: %lu MHz\n", smp_processor_id(), FREQ(lo));
> > +           return;
> > +   }
> > +
> > +   per_cpu(max_freq_mhz, smp_processor_id()) = FREQ(hi);
>
> this_cpu() please, or latch the result of smp_processor_id() into a local 
> variable
> (there are further uses in the function which then would want replacing).
>
> The function has "log" in its name for a reason. Did you look at the 
> conditional at its
> very top? You won't get here for all CPUs. You won't get here at all for Fam1A
> CPUs, as for them the logic will first need amending.

Sorry to overlook that
Then I shall add a specific amd_export_cpufreq_mhz to cover all scenarios...
For Fam1A, I could think of bringing back early DMI method right now...
May I ask what is the more addressed specific reason for not applying to Fam1A?

>
> Jan

Many thanks,
Penny

 


Rackspace

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