From: tip-bot for Prarit Bhargava <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: prarit@redhat.com, kubakici@wp.pl, mingo@kernel.org,
hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de,
williams@redhat.com
Subject: [tip:x86/urgent] x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation
Date: Mon, 4 Dec 2017 14:10:23 -0800 [thread overview]
Message-ID: <tip-b1cbacc8663a4dce62e4ae501e859c82f4aeb1ca@git.kernel.org> (raw)
In-Reply-To: <20171204164521.17870-1-prarit@redhat.com>
Commit-ID: b1cbacc8663a4dce62e4ae501e859c82f4aeb1ca
Gitweb: https://git.kernel.org/tip/b1cbacc8663a4dce62e4ae501e859c82f4aeb1ca
Author: Prarit Bhargava <prarit@redhat.com>
AuthorDate: Mon, 4 Dec 2017 11:45:21 -0500
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 4 Dec 2017 23:03:48 +0100
x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation
Documentation/x86/topology.txt defines smp_num_siblings as "The number of
threads in a core". Since commit bbb65d2d365e ("x86: use cpuid vector 0xb
when available for detecting cpu topology") smp_num_siblings is the
maximum number of threads in a core. If Simultaneous MultiThreading
(SMT) is disabled on a system, smp_num_siblings is 2 and not 1 as
expected.
Use topology_max_smt_threads(), which contains the active numer of threads,
in the __max_logical_packages calculation.
Fixes: b4c0a7326f5d ("x86/smpboot: Fix __max_logical_packages estimate")
Reported-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Prarit Bhargava <prarit@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Jakub Kicinski <kubakici@wp.pl>
Cc: netdev@vger.kernel.org
Cc: "netdev@vger.kernel.org"
Cc: Clark Williams <williams@redhat.com>
Link: https://lkml.kernel.org/r/20171204164521.17870-1-prarit@redhat.com
---
arch/x86/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 05a97d5..7de0aa2 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1304,7 +1304,7 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
* Today neither Intel nor AMD support heterogenous systems so
* extrapolate the boot cpu's data to all packages.
*/
- ncpus = cpu_data(0).booted_cores * smp_num_siblings;
+ ncpus = cpu_data(0).booted_cores * topology_max_smt_threads();
__max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus);
pr_info("Max logical packages: %u\n", __max_logical_packages);
next prev parent reply other threads:[~2017-12-04 22:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-02 0:39 x86 boot broken on -rc1? Jakub Kicinski
2017-12-04 1:28 ` [bisected] x86 boot still broken on -rc2 Jakub Kicinski
2017-12-04 12:28 ` Prarit Bhargava
2017-12-04 13:13 ` Prarit Bhargava
2017-12-04 16:45 ` Prarit Bhargava
2017-12-04 19:48 ` Jakub Kicinski
2017-12-04 22:10 ` tip-bot for Prarit Bhargava [this message]
2017-12-07 9:40 ` [tip:x86/urgent] x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation tip-bot for Prarit Bhargava
2017-12-13 19:37 ` x86 boot broken on -rc1? Björn Töpel
2017-12-13 19:58 ` Jakub Kicinski
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-b1cbacc8663a4dce62e4ae501e859c82f4aeb1ca@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=kubakici@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=prarit@redhat.com \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/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
Powered by JetHome