Skip to content
Commit ceb1cbac authored by Kamalesh Babulal's avatar Kamalesh Babulal Committed by Ingo Molnar
Browse files

sched/x86: Calculate booted cores after construction of sibling_mask

Commit 316ad248

 ("sched/x86: Rewrite set_cpu_sibling_map()")
broke the booted_cores accounting.

The problem is that the booted_cores accounting needs all the
sibling links set up. So restore the second loop and add a comment as
to why its needed.

On qemu booted with -smp sockets=1,cores=2,threads=2;
Before:
 $ grep cores /proc/cpuinfo
 cpu cores       : 2
 cpu cores       : 1
 cpu cores       : 4
 cpu cores       : 3

With the patch:
 $ grep cores /proc/cpuinfo
 cpu cores       : 2
 cpu cores       : 2
 cpu cores       : 2
 cpu cores       : 2

Reported-by: default avatarPrarit Bhargava <prarit@redhat.com>
Reported-by: default avatarBorislav Petkov <bp@amd64.org>
Signed-off-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120531073738.GH7511@linux.vnet.ibm.com
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent eea5b551
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment