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

[PATCH] x86: avoid wrong use of all-but-self IPI shorthand


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 8 Dec 2021 12:47:08 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=Ch3fblJtqZjhd2k1FVzLRRy+qIj6nn4X9h22JMOWea0=; b=ibdUzomx+yUHfvoakpeTM/FkyRO6fE16y3W9qq+MMm7EKHNaUOOXq0II4eic/hIDVsBl67+SgfenXSLdB0SPm935z1za5PyvzB8pRKdY/pLAT/3fZy/y3Ni3Qnaf5lFIM1y5sCRl3pwe8n/By1RfEeOC1WiTXUmWhIHAaI3dAkNmYhIfnt2htlVmO9IO7NRTBnoMKVZKTp8cvIS3SXcLNyM6otUyz19q0A4/j7x0vlLARUBKr2VGbmj9Cy+rRAGpkZ9pnQ05Z59u+GHVZzi8KFmEAfwrVATRcwCEqaPYkoAjyvyFIqZC/Cf3unIHEkRNX+qc2VJZ733NlmsNlm9iuQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BthPTaIjH1WJR7+Vzqmgg+5kBJZzYo7rE6XmYAxvEKT5gRVYj2qsG97/rUd7f2TKg91NwDEcLl17dT3JkN2bVTtPAub2pDG59nkCSdUHY9w/R+oWigd399ZKpECZZGwtPPnluXZLwTbKuwIzriSCuD+I42lrvJOc+l4Q4HeUxykONUXKKEHyySy2gECJwZATcp30Y+QRC6fPjEgZ2hErpBThQF9O3YgKtprPALMYbCr1VzT/R+IhsA6z5pNiAz/3IqmkWumdTxLtp4MPVdx0m/gdEyW5Y1UO+PAHXvCruWDd76xY5Poa7TmdhWVV/i2jyLrHIBn1z289q0jXc86XTQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 08 Dec 2021 11:47:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

With "nosmp" I did observe a flood of "APIC error on CPU0: 04(04), Send
accept error" log messages on an AMD system. And rightly so - nothing
excludes the use of the shorthand in send_IPI_mask() in this case. Set
"unaccounted_cpus" to "true" also when command line restrictions are the
cause.

Note that PV-shim mode is unaffected by this change, first and foremost
because "nosmp" and "maxcpus=" are ignored in this case.

Fixes: 5500d265a2a8 ("x86/smp: use APIC ALLBUT destination shorthand when 
possible")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
While in "nosmp" mode it's probably benign that we switch to the bigsmp
APIC driver simply because there are more than 8 physical CPUs, I
suppose that's inefficient when "maxcpus=" with a value between 2 and 8
(inclusive) is in use. Question is whether that's worthwhile to find a
solution for.

--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -84,9 +84,14 @@ void __init set_nr_cpu_ids(unsigned int
        if (!park_offline_cpus)
                tot_cpus = max_cpus;
        nr_cpu_ids = min(tot_cpus, NR_CPUS + 0u);
-       if (park_offline_cpus && nr_cpu_ids < num_processors)
-               printk(XENLOG_WARNING "SMP: Cannot bring up %u further CPUs\n",
-                      num_processors - nr_cpu_ids);
+       if (nr_cpu_ids < num_processors)
+       {
+               unaccounted_cpus = true;
+               if (park_offline_cpus)
+                       printk(XENLOG_WARNING
+                              "SMP: Cannot bring up %u further CPUs\n",
+                              num_processors - nr_cpu_ids);
+       }
 
 #ifndef nr_cpumask_bits
        nr_cpumask_bits = ROUNDUP(nr_cpu_ids, BITS_PER_LONG);




 


Rackspace

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