From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, rick@microway.com, mingo@kernel.org,
tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: [tip:x86/urgent] x86/apic/x2apic: Initialize cluster ID properly
Date: Thu, 17 May 2018 12:03:46 -0700 [thread overview]
Message-ID: <tip-fed71f7d98795ed0fa1d431910787f0f4a68324f@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.21.1805171418210.1947@nanos.tec.linutronix.de>
Commit-ID: fed71f7d98795ed0fa1d431910787f0f4a68324f
Gitweb: https://git.kernel.org/tip/fed71f7d98795ed0fa1d431910787f0f4a68324f
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 17 May 2018 14:36:39 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 17 May 2018 21:00:12 +0200
x86/apic/x2apic: Initialize cluster ID properly
Rick bisected a regression on large systems which use the x2apic cluster
mode for interrupt delivery to the commit wich reworked the cluster
management.
The problem is caused by a missing initialization of the clusterid field
in the shared cluster data structures. So all structures end up with
cluster ID 0 which only allows sharing between all CPUs which belong to
cluster 0. All other CPUs with a cluster ID > 0 cannot share the data
structure because they cannot find existing data with their cluster
ID. This causes malfunction with IPIs because IPIs are sent to the wrong
cluster and the caller waits for ever that the target CPU handles the IPI.
Add the missing initialization when a upcoming CPU is the first in a
cluster so that the later booting CPUs can find the data and share it for
proper operation.
Fixes: 023a611748fd ("x86/apic/x2apic: Simplify cluster management")
Reported-by: Rick Warner <rick@microway.com>
Bisected-by: Rick Warner <rick@microway.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Rick Warner <rick@microway.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1805171418210.1947@nanos.tec.linutronix.de
---
arch/x86/kernel/apic/x2apic_cluster.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 8b04234e010b..7685444a106b 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -116,6 +116,7 @@ static void init_x2apic_ldr(void)
goto update;
}
cmsk = cluster_hotplug_mask;
+ cmsk->clusterid = cluster;
cluster_hotplug_mask = NULL;
update:
this_cpu_write(cluster_masks, cmsk);
prev parent reply other threads:[~2018-05-17 19:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 16:37 stall/hang on 4.15 kernel with some Xeon skylake CPUs and extended APIC Rick Warner
2018-05-15 16:07 ` [bisected] rcu_sched detected stalls - 4.15 or newer " Rick Warner
2018-05-15 20:19 ` Thomas Gleixner
2018-05-16 14:50 ` Thomas Gleixner
2018-05-16 23:02 ` Rick Warner
2018-05-17 12:36 ` Thomas Gleixner
2018-05-17 15:59 ` Rick Warner
2018-05-17 19:03 ` tip-bot for Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-fed71f7d98795ed0fa1d431910787f0f4a68324f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rick@microway.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®