[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/6] x86/x2apic: use physical destination mode by default
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Thu, 30 Jun 2022 10:54:35 +0200
- 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=arcselector9901; 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=G83kxdx8/BCNbuvV4mxQ2qXbGd7+MsuOADIfqBBoRC4=; b=WotL2ZfM596tjpLIzABB1VpH8uUdLImvKKgWbLlRi9dBMKVjIVHgokpHbCiJB+CAP2oJG1VJ9YLhPf6XzYPxm/GFWLvf+Vg2itfn4OwO+3E+m2Gh6KY31RHmXDx746Ci6dCM+szz706+KEawm81u4mygYUVh2W/u4QHVDk6UdzcFJCsjgFawnajyvAISO5pevEZyyBcjSpvCWKqejZCK54mNQ/3fY+kZnVF4mFQIQPssHH36GDBcL6ZxXQU+NMlCmPAub5QVu5BWSJIeyueh+iHHBCiC1QnCb2+lyZ2Glq0ndjKv0GDtn9CmxtRaePSYpDaJpDVunP5BfzFMRjOFcw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dSMoxkF3zOGw/GzKnKsnPvMfTFmWk6AIBQiHb6slTcR+MOAZ6GpiT56q/aSOZdd1gqA/W5qdr/qvE06oH3ogfNdVGrUrOHh0vLe/yMfnoyz2r/ZeS8D6eEqUKpJkIwZbA8QjD8CwBp+bp/oWP0r5KlY/6iEhERPWErLPmfBwjLOKA9IMb81Q61Qf2D15htgoD9DWmoZaGD/80r/NNo/d4dTU63NA03KHHN/gVuty1fZ1EVhWfGRcredjkOKTFx+W9dErBzzyYFiEeQ+hkkH9pU0Dkq+Rl+NC07ZYdggrDlZOPXgYwbnEVNoyJcjANffcH5GMk2HAuv7NFAoYFYoCbA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 30 Jun 2022 08:56:28 +0000
- Ironport-data: A9a23:SkXhW6OnjKZZlOvvrR24lsFynXyQoLVcMsEvi/4bfWQNrUpx1jUGz 2MYUW+Pa/fYMWSnLdBzatuz8khS6JLTxoNlHAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFUMpBsJ00o5wbZn2dYw2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zw o9A9pqXGVkSMqDJvsEwUyBlKA9jMvgTkFPHCSDXXc276WTjKiGp5so0SUY8MMsf5/p9BnxI+ boAMjcRYxufhuWwhrWmVu1rgcdlJ87uVG8dkig4kXeFUrB4H9afEs0m5vcBtNs0rtpJEvvEI dIQdBJkbQjaYg0JMVASYH47tLj33SKuLGwGwL6TjbgHxnn511R16qL8MP3cWNGtaeRyn2/N8 woq+Ey8WHn2Lue32TeDt36hmOLLtSf6Q54JUq218OZwh1+ezXBVDwcZPXO5q/Skjk+1W/pEN lcZvCEpqMAa9lGvT9T7dw21pjiDpBF0c8FLD+Qw5QWJy6zVywWUHG4JSnhGctNOnNAybSwn0 BmOhdyBONB0mLicSHbY86jOqzq3YHIRNTVaOX5CShYZ6d7+po11lgjIUttoDK+yiJvyBC30x DeJ6iM5gt3/kPI26klyxnif6xrEm3QDZlRdCtn/No590j5EWQ==
- Ironport-hdrordr: A9a23:RPW3GKDF3bCZcO7lHeg3sceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPH/P5wr5lktQ++xoX5PwO080lKQFmrX5WI3PYOCIghrNEGgP1+vfKnjbalTDH41mpN hdmtZFebrN5DFB5K6VgTVQUexQuOVvmJrY+ds2pE0dKD2CBZsQjDuQXW2gYzBLrUR9dOwEPa vZwvACiyureHwRYMj+Ln4ZX9Lbr9mOsJ79exYJCzMu9QHL1FqTmfbHOind+i1bfyJEwL8k/2 SAuwvl5p+7u/X+7hPHzWfc47lfhdOk4NpeA86njNQTN1zX+0+VTbUkf4fHkCE+oemp5lpvuN 7Qoy04N8A20H/VdnHdm2qZ5yDQlBIVr1Pyw16RhnXu5ebjQighNsZHjYVFNjPE9ksJprhHoe 529lPck6ASIQLLnSz76dSNfQptjFCIrX0rlvNWp2BDULEZdKRaoeUkjQ5o+a87bWzHAb0cYa hT5Jm23ocXTbraVQGSgoBX+q3iYpxpdS32AXTruaSuokprdT5CvgklLfck7wY9HaIGOud5Dt v/Q9RVfcl1P6krhIJGdZM8qJiMexvwaCOJFl6uCnLaM4xCE07xivfMkcYIDaeRCdc18Kc=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Using cluster mode by default greatly limits the amount of vectors
available, as then vector space is shared amongst all the CPUs in the
logical cluster.
This can lead to vector shortage issues on boxes with not a huge
amount of CPUs but with a non-trivial amount of devices. There are
reports of boxes with 32 CPUs (2 logical clusters, and thus only 414
dynamic vectors) that run out of vectors and fail to setup interrupts
for dom0.
This could be considered a regression when switching from xAPIC, as
when using xAPIC physical mode is the default when the system has more
than 8 CPUs.
Note that using Physical Destination mode is less efficient than
Logical mode when sending IPIs to multiple CPUs, as in Logical mode
IPIs to CPUs on the same Cluster can be batched together.
Switch default Kconfig selection to use x2APIC physical destination
mode.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v1:
- Expand commit message.
---
docs/misc/xen-command-line.pandoc | 5 ++---
xen/arch/x86/Kconfig | 3 ++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/misc/xen-command-line.pandoc
b/docs/misc/xen-command-line.pandoc
index a92b7d228c..952874c4f4 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -2646,11 +2646,10 @@ Permit use of x2apic setup for SMP environments.
### x2apic_phys (x86)
> `= <boolean>`
-> Default: `true` if **FADT** mandates physical mode or if interrupt remapping
-> is not available, `false` otherwise.
+> Default: `false` if **FADT** mandates cluster mode, `true` otherwise.
In the case that x2apic is in use, this option switches between physical and
-clustered mode. The default, given no hint from the **FADT**, is cluster
+clustered mode. The default, given no hint from the **FADT**, is physical
mode.
### xenheap_megabytes (arm32)
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 6bed72b791..09441761d1 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -228,6 +228,7 @@ endchoice
config X2APIC_PHYSICAL
bool "x2APIC Physical Destination mode"
+ default y
help
Use x2APIC Physical Destination mode by default when available.
@@ -242,7 +243,7 @@ config X2APIC_PHYSICAL
The mode when this option is not selected is Logical Destination.
- If unsure, say N.
+ If unsure, say Y.
config GUEST
bool
--
2.36.1
|