diff mbox series

[v2,2/6] x86/x2apic: use physical destination mode by default

Message ID 20220630085439.83193-3-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86/irq: switch x2APIC default destination mode | expand

Commit Message

Roger Pau Monné June 30, 2022, 8:54 a.m. UTC
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@citrix.com>
---
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 mbox series

Patch

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