* changeset 8831 gets sockets, cores, and siblings wrong
@ 2006-02-15 21:21 Andrew Theurer
2006-02-16 11:45 ` Keir Fraser
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Theurer @ 2006-02-15 21:21 UTC (permalink / raw)
To: xen-devel
FWIW, I noticed that changeset 8831 gets the sockets/cores/siblings
incorrect on my system. On 8830 I get 4 sockets per node, 2 cores per
socket, and 2 threads per core. On 8831 I get 1 socket per node, 2
cores per socket, and 8 threads per core. Xen boot messages still
appear to show four distinct physical cpus (sockets). Just wondering if
anyone has noticed this behavior.
-Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: changeset 8831 gets sockets, cores, and siblings wrong
2006-02-15 21:21 changeset 8831 gets sockets, cores, and siblings wrong Andrew Theurer
@ 2006-02-16 11:45 ` Keir Fraser
2006-02-16 18:18 ` [PATCH] " Andrew Theurer
0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2006-02-16 11:45 UTC (permalink / raw)
To: Andrew Theurer; +Cc: xen-devel
On 15 Feb 2006, at 21:21, Andrew Theurer wrote:
> FWIW, I noticed that changeset 8831 gets the sockets/cores/siblings
> incorrect on my system. On 8830 I get 4 sockets per node, 2 cores per
> socket, and 2 threads per core. On 8831 I get 1 socket per node, 2
> cores per socket, and 8 threads per core. Xen boot messages still
> appear to show four distinct physical cpus (sockets). Just wondering
> if anyone has noticed this behavior.
This all stems from an incorrect value for smp_num_siblings. This could
come from one of two places:
1. Do you get a message 'WARNING: 8 siblings found for CPUx, should be
2' during boot? If so, smpboot.c is screwing up the smp_num_siblings
calculation.
2. Otherwise, detect_ht() in arch/x86/cpu/common.c must be the
culprit, and you'll need to add some tracing to it to find out where
the value '8' is coming from.
-- Keir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] changeset 8831 gets sockets, cores, and siblings wrong
2006-02-16 11:45 ` Keir Fraser
@ 2006-02-16 18:18 ` Andrew Theurer
2006-02-16 18:27 ` Keir Fraser
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Theurer @ 2006-02-16 18:18 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel
[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]
Keir Fraser wrote:
>
> On 15 Feb 2006, at 21:21, Andrew Theurer wrote:
>
>> FWIW, I noticed that changeset 8831 gets the sockets/cores/siblings
>> incorrect on my system. On 8830 I get 4 sockets per node, 2 cores
>> per socket, and 2 threads per core. On 8831 I get 1 socket per node,
>> 2 cores per socket, and 8 threads per core. Xen boot messages still
>> appear to show four distinct physical cpus (sockets). Just wondering
>> if anyone has noticed this behavior.
>
> This all stems from an incorrect value for smp_num_siblings. This
> could come from one of two places:
> 1. Do you get a message 'WARNING: 8 siblings found for CPUx, should
> be 2' during boot? If so, smpboot.c is screwing up the
> smp_num_siblings calculation.
> 2. Otherwise, detect_ht() in arch/x86/cpu/common.c must be the
> culprit, and you'll need to add some tracing to it to find out where
> the value '8' is coming from.
It looks like with changeset 8831 cpu_core_ids are no longer unique
across phys cpus. So, when we search for siblings to populate
cpu_sibling_map, just checking for same core IDs are not good enough.
Both core ID and phys cpu ID have to match. Patch attached fixes this.
-Andrew
<signed-off-by: habanero@us.ibm.com>
[-- Attachment #2: fix_sibling_calc-8849.patch --]
[-- Type: text/x-patch, Size: 685 bytes --]
diff -Naurp xen-unstable.hg-8849/xen/arch/x86/smpboot.c xen-unstable.hg-8849-sibling_fix/xen/arch/x86/smpboot.c
--- xen-unstable.hg-8849/xen/arch/x86/smpboot.c 2006-02-16 12:15:53.000000000 -0600
+++ xen-unstable.hg-8849-sibling_fix/xen/arch/x86/smpboot.c 2006-02-16 12:11:33.000000000 -0600
@@ -1093,7 +1093,8 @@ static void __init smp_boot_cpus(unsigne
for (i = 0; i < NR_CPUS; i++) {
if (!cpu_isset(i, cpu_callout_map))
continue;
- if (cpu_core_id[cpu] == cpu_core_id[i]) {
+ if (cpu_core_id[cpu] == cpu_core_id[i] &&
+ phys_proc_id[cpu] == phys_proc_id[i]) {
siblings++;
cpu_set(i, cpu_sibling_map[cpu]);
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] changeset 8831 gets sockets, cores, and siblings wrong
2006-02-16 18:18 ` [PATCH] " Andrew Theurer
@ 2006-02-16 18:27 ` Keir Fraser
0 siblings, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2006-02-16 18:27 UTC (permalink / raw)
To: Andrew Theurer; +Cc: xen-devel
On 16 Feb 2006, at 18:18, Andrew Theurer wrote:
> It looks like with changeset 8831 cpu_core_ids are no longer unique
> across phys cpus. So, when we search for siblings to populate
> cpu_sibling_map, just checking for same core IDs are not good enough.
> Both core ID and phys cpu ID have to match. Patch attached fixes
> this.
Thanks. It turns out all that code in smpboot.c disappeared in the
latest 2.6 codebase, so I upgraded to that and the problem has gone
away. :-)
-- Keir
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-16 18:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-15 21:21 changeset 8831 gets sockets, cores, and siblings wrong Andrew Theurer
2006-02-16 11:45 ` Keir Fraser
2006-02-16 18:18 ` [PATCH] " Andrew Theurer
2006-02-16 18:27 ` Keir Fraser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.