From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>,
Jakub Kicinski <kubakici@wp.pl>,
netdev@vger.kernel.org, Clark Williams <williams@redhat.com>,
Andi Kleen <ak@linux.intel.com>,
x86@kernel.org
Subject: Re: b1cbacc866 ("x86/smpboot: Do not use smp_num_siblings in .."): divide error: 0000 [#1] SMP DEBUG_PAGEALLOC
Date: Tue, 5 Dec 2017 09:30:36 -0500 [thread overview]
Message-ID: <20171205143036.27451-1-prarit@redhat.com> (raw)
In-Reply-To: <450d8bc5-dee3-98ce-b9a7-55de0903f0ca@redhat.com>
>[ 0.029102] Hierarchical SRCU implementation.
>[ 0.030040] smp: Bringing up secondary CPUs ...
>[ 0.030528] smp: Brought up 1 node, 1 CPU
>[ 0.030953] divide error: 0000 [#1] SMP DEBUG_PAGEALLOC
>[ 0.031000] Modules linked in:
>[ 0.031000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-01223-gb1cbacc #1
>[ 0.031000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
>[ 0.031000] task: ffff88001e460000 task.stack: ffffc90000008000
A single socket/package, single core, single thread system
has 1 thread. __max_smt_threads is not set to 1 since smp_callin() is never
called. The minimum value of __max_smt_threads must be 1.
tglx, this is built on -tip.
P.
----8<----
Subject: [PATCH] arch/x86: Initialize __max_smt_threads to 1
A single socket, single core, single thread system has __max_smt_threads
set to 0 since smp_callin() is not called.
__max_smt_threads must be a minimum of 1.
Fixes: b1cbacc8663a ("x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation)
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Jakub Kicinski <kubakici@wp.pl>
Cc: netdev@vger.kernel.org
Cc: "netdev@vger.kernel.org"
Cc: Clark Williams <williams@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: x86@kernel.org
Link: https://marc.info/?t=151246092100004&r=1&w=2
---
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 eaee15fb7d8b..882c61e1d7a2 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(__max_logical_packages);
static unsigned int logical_packages __read_mostly;
/* Maximum number of SMT threads on any online core */
-int __max_smt_threads __read_mostly;
+int __read_mostly __max_smt_threads = 1;
/* Flag to indicate if a complete sched domain rebuild is required */
bool x86_topology_update;
--
2.15.0.rc0.39.g2f0e14e64
parent reply other threads:[~2017-12-05 14:30 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <450d8bc5-dee3-98ce-b9a7-55de0903f0ca@redhat.com>]
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=20171205143036.27451-1-prarit@redhat.com \
--to=prarit@redhat.com \
--cc=ak@linux.intel.com \
--cc=kubakici@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=williams@redhat.com \
--cc=x86@kernel.org \
/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