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

Re: [PATCH v4 2/4] xen/arm: optimize the size of struct vcpu


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 29 Dec 2025 11:27:27 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=EqZyFhyNsQetKcGvUKjoour08w8x+Jyj2xRZXGX780Y=; b=XhVAH8Lmcua3VTTCfDpn97pmPNt6YeVSnFNgm/1UYbhwtVyV5w6N7KW7I1O88Gu7G5PslkGt72w4321x7AjWP4AXedce9GUPJsKt51m276CRJEd6n1c42pzuyA3W5jjyemU+a7hi0cr51OKKq5rucs+4Aq71KLawb3XPfkPi9v5yLfDDeiSQJB9byGF0NA03qXhhQkz5XPpaIEtPsc4MkMbpa/6IH/xGKw0iE2RCy7xyL4ceI8ktRrUE2IafgCXATpSg1+Z22dh4Wy9/1qXij4BmPMYloAqCyOyFUccsUOduswe4zuY3AQepO5mk463Iev5O0lYvd+ZDqEUVK+Qabw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HzLVUInNWm4Qe3P34sKlG2KvGuX252OGMJ08v3RW3ja3NPCCOxyqYjbgEU4fAaGX1dNAQWqdrwy2VP/l1xJs8PE/OX2cN3WpxXv6NkoE7etrefWfLmXZ+DXv7dNpZPTjJ47vY/RpHifSA+My7ivCPGYLdxm1A9TjMIjzuTFxq5qrnNyESEiLsdQxmm2PZkMNOQ/bWj7h2O4MGBFfb67zI6QJ3zDTyp6OS1hDYlbTfHB/kCTHPFG9c1mciczAfsP/IBfS+CfPyszRfxNSWJQrMkIbhfZhEyg025BQU2uVPhJXsdZCmfRMB87wvVmDi5TGT1ryXcYkpXxPOsa/uJP06Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 29 Dec 2025 11:27:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29/12/2025 11:10 am, Orzel, Michal wrote:
>
> On 29/12/2025 12:08, Orzel, Michal wrote:
>>
>> On 23/12/2025 18:01, Oleksii Kurochko wrote:
>>> When CONFIG_NEW_VGIC=y and CONFIG_ARM_64=y, the size of struct vcpu
>>> exceeds one page, which requires allocating two pages and led to the
>>> introduction of MAX_PAGES_PER_VCPU.
> Also, I think it would be better to drop MAX_PAGES_PER_VCPU in this patch.

Or at least shrink it to just 1, which would be minimal churn.

>
> ~Michal
>
>>> To remove the need for MAX_PAGES_PER_VCPU in a follow-up patch, the vgic
>>> member of NEW_VGIC's struct vgic_vcpu member private_irq is changed to a
>> s/vgic_vcpu/vgic_cpu/
>> s/private_irq/private_irqs/
>>
>>> pointer to struct vgic_irq.
>>> As a result, the size of struct vcpu for Arm64 is reduced to 2176 bytes,
>>> compared to 3840 bytes (without these changes and with CONFIG_ARM_64=y)
>>> and 4736 bytes (without these changes and with both CONFIG_ARM_64=y and
>>> CONFIG_NEW_VGIC=y).
>> You only touch new vGIC, so there should be no size reduction without it but 
>> the
>> paragraph reads as if the change affected both old and new vGIC. Also I would
>> mention that probably you provided the numbers based on a defconfig target.

I think that was stale from v1, where this patch was far larger and more
invasive.

~Andrew



 


Rackspace

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