[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v4 02/15] xen/cpufreq: extract _PSD info from "struct xen_processor_performance"
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: "Penny, Zheng" <penny.zheng@xxxxxxx>
- Date: Tue, 6 May 2025 07:22:41 +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=v2+gJ7NxO/tieKwOd+C7kF5sZB2s+VUhGpthCroc7vM=; b=kHOe3ZFeijvlU2piLx45J5G8wGG8JM689A7IAfuosGSxvnPbdX+u0fogbgtBwNerlTmkyPPn1IAYR16Jkkjx/J1Lcrz8tY53BFpd+TL4rXOIIoKIVO2uuHg3M7zqKBwb9afMASu0rvzsmSWyuiqZPxNOwDgSf74VIKrtUL19rMsSMbRE5+x7z1lsjYcJr7QdCDY3cOkWNnTWT2xEln4ZdwXSGICeb79+QpPCuGWimLVU94Rjh+HVoBFmuCl1W4haBM04J1jDB0htehWoDA7x8qIxmnwS7R58/R1YJ4j8ESucPjGBcbvCpM6QADPaqD2Z/xev/7ATAGFHCNzij2hzvQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gUCgRnkpOcuaIIZJUYi4u2+Frrz6HtM2IBGUDyV9Gkt/DSi+o5mZvyvhv4Md7dPbV9M6BDqwia4EL07QwqwCLOkwp3WKajn23JhbvivfGltHvfyluTg1XZQ7XH42yR/YXS01d0ZZ3nMZnjVR7p47bfidbgYXcqRdqFRepgw5cMMOMeqpsKzBPTG3o2rf4KNYOoDzo4JVGBwLqRAZpzE3XgBbvUdibH1qJcU1nW2IHxruae1ZwwFcC5/mcgi396QCNP/bTyOEf8GhbOANbTATo9DTf1tO0lM/HVTjqJuVfy3wMKBhzjhyoZYuW4UEX3Ks0CX1uGTxFKlVdhzyeFA5hA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@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, 06 May 2025 07:23:03 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ActionId=7dfca292-8034-463d-a626-2ab4fbf23c8f;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ContentBits=0;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Enabled=true;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Method=Privileged;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Name=Open Source;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SetDate=2025-05-06T07:21:59Z;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Tag=10, 0, 1, 1;
- Thread-index: AQHbrRCjQUXzVZg75kKZW3IeVU/v2LO5SzoAgAv/ooA=
- Thread-topic: [PATCH v4 02/15] xen/cpufreq: extract _PSD info from "struct xen_processor_performance"
[Public]
Hi,
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, April 28, 2025 11:32 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; Anthony PERARD <anthony.perard@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 v4 02/15] xen/cpufreq: extract _PSD info from "struct
> xen_processor_performance"
>
> On 14.04.2025 09:40, Penny Zheng wrote:
> > --- a/xen/drivers/cpufreq/cpufreq.c
> > +++ b/xen/drivers/cpufreq/cpufreq.c
> > + {
> > + case XEN_PX_INIT:
> > + if ( shared_type )
> > + *shared_type = processor_pminfo[cpu]->perf.shared_type;
> > + if ( domain_info )
> > + *domain_info = processor_pminfo[cpu]->perf.domain_info;
>
> Does this need to be a structure copy? Can't you hand back just a pointer,
> with the
> function parameter being const struct xen_psd_package **?
>
I've considered handing backing a pointer, then maybe we need to allocate space
for
"struct xen_psd_package **domain_info = xvzalloc(struct xen_psd_package *);",
and XVFREE(xxx)
it in each exit, especially cpufreq_add_cpu() has a lot exits, which could be a
few code churn.
So I chose the struct copy to have the smallest change.
> > + break;
> > + default:
> Jan
|