[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1603181254330.3978@nanos>
Date: Fri, 18 Mar 2016 12:55:56 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Mike Galbraith <umgwanakikbuti@...il.com>
cc: Peter Zijlstra <peterz@...radead.org>,
Xiong Zhou <jencce.kernel@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
Andreas Herrmann <aherrmann@...e.com>
Subject: Re: 4.5.0+ panic when setup loop device
On Fri, 18 Mar 2016, Mike Galbraith wrote:
> On Thu, 2016-03-17 at 10:52 +0100, Peter Zijlstra wrote:
>
> > Andreas; Borislav said to Cc you since you wrote all this.
> > The issue is that Linux assumes:
> >
> > > nr_logical_cpus = nr_cores * nr_siblings
>
> It also seems to now assume that if SMT is possible, it's enabled.
>
> Below is my 8 socket DL980 G7, which has SMT turned off for RT testing,
> booting NOPREEMPT master tuned for maximum bloat ala distro and getting
> confused by me telling it (as always) nr_cpus=64. Bad juju ensues.
:)
Does the patch below fix the wreckage?
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 643dbdccf4bc..c5ac71276076 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -319,7 +319,7 @@ static void __init smp_init_package_map(void)
* might change in the future....
*/
ncpus = boot_cpu_data.x86_max_cores * smp_num_siblings;
- __max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus);
+ __max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
/*
* Possibly larger than what we need as the number of apic ids per
Powered by blists - more mailing lists