* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 3:16 YhLu
2005-06-02 18:50 ` Andi Kleen
0 siblings, 1 reply; 16+ messages in thread
From: YhLu @ 2005-06-02 3:16 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
andi,
in arch/x86_64/kernel/smboot.c, function detect_siblings(),
because smp_num_siblings is always =1, so several lines can be removed.
for_each_online_cpu (cpu) {
struct cpuinfo_x86 *c = cpu_data + cpu;
*R* int siblings = 0;
int i;
*R* if (smp_num_siblings > 1) {
*R* for_each_online_cpu (i) {
*R* if (cpu_core_id[cpu] == cpu_core_id[i]) {
*R* siblings++;
*R* cpu_set(i, cpu_sibling_map[cpu]);
*R* }
*R* }
*R* } else {
*R* siblings++;
cpu_set(cpu, cpu_sibling_map[cpu]);
*R* }
*R* if (siblings != smp_num_siblings) {
*R* printk(KERN_WARNING
*R* "WARNING: %d siblings found for CPU%d, should be %d\n",
*R* siblings, cpu, smp_num_siblings);
*R* smp_num_siblings = siblings;
*R* }
Also I found the workaround for hang on second node is
adding one line in setup.c
/* Low order bits define the core id (index of core in socket) */
cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1);
/* Convert the APIC ID into the socket ID */
phys_proc_id[cpu] >>= bits;
+ printk(KERN_INFO " CPU %d(%d) phys_proc_id %d Core %d\n",
+ cpu, c->x86_num_cores, phys_proc_id[cpu], cpu_core_id[cpu]);
My compile environment SUSE 9.2 gcc version is 3.3.3???
YH
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 3:26 YhLu
2005-06-02 18:51 ` Andi Kleen
0 siblings, 1 reply; 16+ messages in thread
From: YhLu @ 2005-06-02 3:26 UTC (permalink / raw)
To: YhLu, Andi Kleen; +Cc: linux-kernel
Brought up 4 CPUs
CPU 0, cpu_sibling_map[0]= 1
CPU 0, cpu_core_map[0]= 3
CPU 1, cpu_sibling_map[1]= 2
CPU 1, cpu_core_map[1]= 3
CPU 2, cpu_sibling_map[2]= 4
CPU 2, cpu_core_map[2]= c
CPU 3, cpu_sibling_map[3]= 8
CPU 3, cpu_core_map[3]= c
are the cpu_sibling_map[] right?
YH
> -----Original Message-----
> From: YhLu
> Sent: Wednesday, June 01, 2005 8:17 PM
> To: Andi Kleen
> Cc: linux-kernel@vger.kernel.org
> Subject: RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual cor e dual way
>
> andi,
>
> in arch/x86_64/kernel/smboot.c, function detect_siblings(),
>
> because smp_num_siblings is always =1, so several lines can
> be removed.
>
> for_each_online_cpu (cpu) {
> struct cpuinfo_x86 *c = cpu_data + cpu;
> *R* int siblings = 0;
> int i;
> *R* if (smp_num_siblings > 1) {
> *R* for_each_online_cpu (i) {
> *R* if (cpu_core_id[cpu] ==
> cpu_core_id[i]) {
> *R* siblings++;
> *R* cpu_set(i,
> cpu_sibling_map[cpu]);
> *R* }
> *R* }
> *R* } else {
> *R* siblings++;
> cpu_set(cpu, cpu_sibling_map[cpu]);
> *R* }
>
>
> *R* if (siblings != smp_num_siblings) {
> *R* printk(KERN_WARNING
> *R* "WARNING: %d siblings found for CPU%d,
> should be %d\n",
> *R* siblings, cpu, smp_num_siblings);
> *R* smp_num_siblings = siblings;
> *R* }
>
> Also I found the workaround for hang on second node is adding
> one line in setup.c
> /* Low order bits define the core id (index of core
> in socket) */
> cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1);
> /* Convert the APIC ID into the socket ID */
> phys_proc_id[cpu] >>= bits;
> + printk(KERN_INFO " CPU %d(%d) phys_proc_id %d Core %d\n",
> + cpu, c->x86_num_cores, phys_proc_id[cpu],
> + cpu_core_id[cpu]);
>
> My compile environment SUSE 9.2 gcc version is 3.3.3???
>
> YH
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in the body of a message to
> majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 3:16 YhLu
@ 2005-06-02 18:50 ` Andi Kleen
0 siblings, 0 replies; 16+ messages in thread
From: Andi Kleen @ 2005-06-02 18:50 UTC (permalink / raw)
To: YhLu; +Cc: linux-kernel
On Wed, Jun 01, 2005 at 08:16:35PM -0700, YhLu wrote:
> andi,
>
> in arch/x86_64/kernel/smboot.c, function detect_siblings(),
>
> because smp_num_siblings is always =1, so several lines can be removed.
What do you mean? On intel systems with HyperThreading it is > 1.
>
> for_each_online_cpu (cpu) {
> struct cpuinfo_x86 *c = cpu_data + cpu;
> *R* int siblings = 0;
> int i;
> *R* if (smp_num_siblings > 1) {
> *R* for_each_online_cpu (i) {
> *R* if (cpu_core_id[cpu] == cpu_core_id[i]) {
> *R* siblings++;
> *R* cpu_set(i, cpu_sibling_map[cpu]);
> *R* }
> *R* }
> *R* } else {
> *R* siblings++;
> cpu_set(cpu, cpu_sibling_map[cpu]);
> *R* }
>
>
> *R* if (siblings != smp_num_siblings) {
> *R* printk(KERN_WARNING
> *R* "WARNING: %d siblings found for CPU%d, should be %d\n",
> *R* siblings, cpu, smp_num_siblings);
> *R* smp_num_siblings = siblings;
> *R* }
>
> Also I found the workaround for hang on second node is
> adding one line in setup.c
> /* Low order bits define the core id (index of core in socket) */
> cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1);
> /* Convert the APIC ID into the socket ID */
> phys_proc_id[cpu] >>= bits;
> + printk(KERN_INFO " CPU %d(%d) phys_proc_id %d Core %d\n",
> + cpu, c->x86_num_cores, phys_proc_id[cpu], cpu_core_id[cpu]);
That would just change the timing.
-Andi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 3:26 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way YhLu
@ 2005-06-02 18:51 ` Andi Kleen
0 siblings, 0 replies; 16+ messages in thread
From: Andi Kleen @ 2005-06-02 18:51 UTC (permalink / raw)
To: YhLu; +Cc: linux-kernel
On Wed, Jun 01, 2005 at 08:26:00PM -0700, YhLu wrote:
> Brought up 4 CPUs
> CPU 0, cpu_sibling_map[0]= 1
> CPU 0, cpu_core_map[0]= 3
> CPU 1, cpu_sibling_map[1]= 2
> CPU 1, cpu_core_map[1]= 3
> CPU 2, cpu_sibling_map[2]= 4
> CPU 2, cpu_core_map[2]= c
> CPU 3, cpu_sibling_map[3]= 8
> CPU 3, cpu_core_map[3]= c
> are the cpu_sibling_map[] right?
Yes it is correct. A CPU is always a sibling of itself.
-Andi
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 18:55 YhLu
0 siblings, 0 replies; 16+ messages in thread
From: YhLu @ 2005-06-02 18:55 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
So core1 is not the sibling of core0?
YH
> -----Original Message-----
> From: Andi Kleen [mailto:ak@muc.de]
> Sent: Thursday, June 02, 2005 11:52 AM
> To: YhLu
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual cor e dual way
>
> On Wed, Jun 01, 2005 at 08:26:00PM -0700, YhLu wrote:
> > Brought up 4 CPUs
> > CPU 0, cpu_sibling_map[0]= 1
> > CPU 0, cpu_core_map[0]= 3
> > CPU 1, cpu_sibling_map[1]= 2
> > CPU 1, cpu_core_map[1]= 3
> > CPU 2, cpu_sibling_map[2]= 4
> > CPU 2, cpu_core_map[2]= c
> > CPU 3, cpu_sibling_map[3]= 8
> > CPU 3, cpu_core_map[3]= c
> > are the cpu_sibling_map[] right?
>
> Yes it is correct. A CPU is always a sibling of itself.
>
> -Andi
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 18:56 YhLu
2005-06-02 19:03 ` Dave Jones
2005-06-02 19:06 ` Ashok Raj
0 siblings, 2 replies; 16+ messages in thread
From: YhLu @ 2005-06-02 18:56 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
Really?, smp_num_siblings is global variable and initially is set 1.
YH
> -----Original Message-----
> From: Andi Kleen [mailto:ak@muc.de]
> Sent: Thursday, June 02, 2005 11:51 AM
> To: YhLu
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual cor e dual way
>
> On Wed, Jun 01, 2005 at 08:16:35PM -0700, YhLu wrote:
> > andi,
> >
> > in arch/x86_64/kernel/smboot.c, function detect_siblings(),
> >
> > because smp_num_siblings is always =1, so several lines
> can be removed.
>
> What do you mean? On intel systems with HyperThreading it is > 1.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 18:56 YhLu
@ 2005-06-02 19:03 ` Dave Jones
2005-06-03 19:26 ` Siddha, Suresh B
2005-06-02 19:06 ` Ashok Raj
1 sibling, 1 reply; 16+ messages in thread
From: Dave Jones @ 2005-06-02 19:03 UTC (permalink / raw)
To: YhLu; +Cc: Andi Kleen, linux-kernel
On Thu, Jun 02, 2005 at 11:56:25AM -0700, YhLu wrote:
> Really?, smp_num_siblings is global variable and initially is set 1.
Why shouldn't it be ? It would only make sense to make it
non-global if we supported a configuration where different
CPUs had different numbers of siblings, which we don't.
(And I'm fairly sure that AMD/Intel don't/won't either)
Dave
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 18:56 YhLu
2005-06-02 19:03 ` Dave Jones
@ 2005-06-02 19:06 ` Ashok Raj
1 sibling, 0 replies; 16+ messages in thread
From: Ashok Raj @ 2005-06-02 19:06 UTC (permalink / raw)
To: YhLu; +Cc: Andi Kleen, linux-kernel
On Thu, Jun 02, 2005 at 11:56:25AM -0700, YhLu wrote:
>
> Really?, smp_num_siblings is global variable and initially is set 1.
>
> YH
>
But detect_ht() can override it.. thats just the start value.
try cscope :-)
Cheers,
ashok
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 20:42 YhLu
2005-06-03 16:09 ` Andi Kleen
0 siblings, 1 reply; 16+ messages in thread
From: YhLu @ 2005-06-02 20:42 UTC (permalink / raw)
To: Ashok Raj; +Cc: Andi Kleen, linux-kernel
cpuid(1, &eax, &ebx, &ecx, &edx);
smp_num_siblings = (ebx & 0xff0000) >> 16;
For amd dual core, smp_num_siblings is set to 1, and it mean has two cores.
seq_printf(m, "siblings\t: %d\n",
c->x86_num_cores * smp_num_siblings);
for Intel it would be
c->x86_num_cores is 2 and smp_num_siblings is 2 too....
so every core will be HT....
Function 0000_0001[EBX]
EBX[23:16] Logical Processor Count. If CPUID Fn[8000_0001, 0000_0001][EDX:
HTT, ECX:
CMPLegacy] = 11b, then this field indicates the number of CPU cores in the
processor.
Otherwise, this field is reserved.
what is intel value about cpuid(1) ebx [23:16], when the CPU is dual core,
but HT is disabled.
1?
YH
> -----Original Message-----
> From: Ashok Raj [mailto:ashok.raj@intel.com]
> Sent: Thursday, June 02, 2005 12:07 PM
> To: YhLu
> Cc: Andi Kleen; linux-kernel@vger.kernel.org
> Subject: Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual cor e dual way
>
> On Thu, Jun 02, 2005 at 11:56:25AM -0700, YhLu wrote:
> >
> > Really?, smp_num_siblings is global variable and
> initially is set 1.
> >
> > YH
> >
> But detect_ht() can override it.. thats just the start value.
>
> try cscope :-)
>
> Cheers,
> ashok
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 21:15 YhLu
0 siblings, 0 replies; 16+ messages in thread
From: YhLu @ 2005-06-02 21:15 UTC (permalink / raw)
To: YhLu, Ashok Raj; +Cc: Andi Kleen, linux-kernel
in detect_ht
if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c,
X86_FEATURE_CMP_LEGACY))
return;
cpu_has(c, X86_FEATURE_CMP_LEGACY) for AMD is 1, so smp_num_siblings is not
changed and it is still initial value. (1)....
YH
> -----Original Message-----
> From: YhLu
> Sent: Thursday, June 02, 2005 1:42 PM
> To: Ashok Raj
> Cc: Andi Kleen; linux-kernel@vger.kernel.org
> Subject: RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual cor e dual way
>
> cpuid(1, &eax, &ebx, &ecx, &edx);
> smp_num_siblings = (ebx & 0xff0000) >> 16;
>
> For amd dual core, smp_num_siblings is set to 1, and it mean
> has two cores.
>
> seq_printf(m, "siblings\t: %d\n",
> c->x86_num_cores * smp_num_siblings);
>
> for Intel it would be
> c->x86_num_cores is 2 and smp_num_siblings is 2 too....
> so every core will be HT....
>
>
> Function 0000_0001[EBX]
> EBX[23:16] Logical Processor Count. If CPUID Fn[8000_0001,
> 0000_0001][EDX:
> HTT, ECX:
> CMPLegacy] = 11b, then this field indicates the number of CPU
> cores in the processor.
> Otherwise, this field is reserved.
>
> what is intel value about cpuid(1) ebx [23:16], when the CPU
> is dual core, but HT is disabled.
> 1?
>
> YH
>
> > -----Original Message-----
> > From: Ashok Raj [mailto:ashok.raj@intel.com]
> > Sent: Thursday, June 02, 2005 12:07 PM
> > To: YhLu
> > Cc: Andi Kleen; linux-kernel@vger.kernel.org
> > Subject: Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual
> > cor e dual way
> >
> > On Thu, Jun 02, 2005 at 11:56:25AM -0700, YhLu wrote:
> > >
> > > Really?, smp_num_siblings is global variable and
> > initially is set 1.
> > >
> > > YH
> > >
> > But detect_ht() can override it.. thats just the start value.
> >
> > try cscope :-)
> >
> > Cheers,
> > ashok
> >
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in the body of a message to
> majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 21:33 YhLu
2005-06-03 16:12 ` Andi Kleen
0 siblings, 1 reply; 16+ messages in thread
From: YhLu @ 2005-06-02 21:33 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
So siblings should be in one core...? that make sense....
YH
> -----Original Message-----
> From: Andi Kleen [mailto:ak@muc.de]
> Sent: Thursday, June 02, 2005 11:52 AM
> To: YhLu
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron
> MB/with dual cor e dual way
>
> On Wed, Jun 01, 2005 at 08:26:00PM -0700, YhLu wrote:
> > Brought up 4 CPUs
> > CPU 0, cpu_sibling_map[0]= 1
> > CPU 0, cpu_core_map[0]= 3
> > CPU 1, cpu_sibling_map[1]= 2
> > CPU 1, cpu_core_map[1]= 3
> > CPU 2, cpu_sibling_map[2]= 4
> > CPU 2, cpu_core_map[2]= c
> > CPU 3, cpu_sibling_map[3]= 8
> > CPU 3, cpu_core_map[3]= c
> > are the cpu_sibling_map[] right?
>
> Yes it is correct. A CPU is always a sibling of itself.
>
> -Andi
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
@ 2005-06-02 21:34 YhLu
0 siblings, 0 replies; 16+ messages in thread
From: YhLu @ 2005-06-02 21:34 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
Can you duplicate the timing problem?
YH
> > Also I found the workaround for hang on second node is
> adding one line
> > in setup.c
> > /* Low order bits define the core id (index of core
> in socket) */
> > cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1);
> > /* Convert the APIC ID into the socket ID */
> > phys_proc_id[cpu] >>= bits;
> > + printk(KERN_INFO " CPU %d(%d) phys_proc_id %d
> Core %d\n",
> > + cpu, c->x86_num_cores, phys_proc_id[cpu],
> > + cpu_core_id[cpu]);
>
> That would just change the timing.
>
> -Andi
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 20:42 YhLu
@ 2005-06-03 16:09 ` Andi Kleen
2005-06-03 18:56 ` Siddha, Suresh B
0 siblings, 1 reply; 16+ messages in thread
From: Andi Kleen @ 2005-06-03 16:09 UTC (permalink / raw)
To: YhLu; +Cc: Ashok Raj, linux-kernel, suresh.b.siddha
On Thu, Jun 02, 2005 at 01:42:00PM -0700, YhLu wrote:
> cpuid(1, &eax, &ebx, &ecx, &edx);
> smp_num_siblings = (ebx & 0xff0000) >> 16;
>
> For amd dual core, smp_num_siblings is set to 1, and it mean has two cores.
>
> seq_printf(m, "siblings\t: %d\n",
> c->x86_num_cores * smp_num_siblings);
Yes; that is done so that the scheduler does not set up
SMT scheduling, which is suboptimal for dual core.
Also some time ago the scheduler domain setup tended to break
with SMT and NUMA combined, but that is probably fixed
now. But it also made it advisable to not set the sibling count.
>
> for Intel it would be
> c->x86_num_cores is 2 and smp_num_siblings is 2 too....
> so every core will be HT....
If that was true, then a true DC+HT machine would report 4.
I doubt it is, but Suresh can probably clarify.
> Function 0000_0001[EBX]
> EBX[23:16] Logical Processor Count. If CPUID Fn[8000_0001, 0000_0001][EDX:
> HTT, ECX:
> CMPLegacy] = 11b, then this field indicates the number of CPU cores in the
> processor.
> Otherwise, this field is reserved.
>
> what is intel value about cpuid(1) ebx [23:16], when the CPU is dual core,
> but HT is disabled.
> 1?
-Andi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 21:33 YhLu
@ 2005-06-03 16:12 ` Andi Kleen
0 siblings, 0 replies; 16+ messages in thread
From: Andi Kleen @ 2005-06-03 16:12 UTC (permalink / raw)
To: YhLu; +Cc: linux-kernel
On Thu, Jun 02, 2005 at 02:33:06PM -0700, YhLu wrote:
> So siblings should be in one core...? that make sense....
Yes. The whole terminology is confusing for historical reasons.
If we started again with the naming game there would be probably
different names.
To make it even more confusing while it is different internally
in the kernel, CPUID and /proc/cpuinfo fake them to the same
to the world to be compatible with old software who e.g.
reads this for licensing purposes.
BTW I doubt these are related to the hang you are chasing
because if you grep the kernel cpu_core_map is never used
in the kernel at all except for cpuinfo. This means
it is unlikely to cause any hangs.
-Andi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-03 16:09 ` Andi Kleen
@ 2005-06-03 18:56 ` Siddha, Suresh B
0 siblings, 0 replies; 16+ messages in thread
From: Siddha, Suresh B @ 2005-06-03 18:56 UTC (permalink / raw)
To: Andi Kleen; +Cc: YhLu, Ashok Raj, linux-kernel, suresh.b.siddha
On Fri, Jun 03, 2005 at 06:09:32PM +0200, Andi Kleen wrote:
> On Thu, Jun 02, 2005 at 01:42:00PM -0700, YhLu wrote:
> >
> > for Intel it would be
> > c->x86_num_cores is 2 and smp_num_siblings is 2 too....
> > so every core will be HT....
>
> If that was true, then a true DC+HT machine would report 4.
>
> I doubt it is, but Suresh can probably clarify.
On a DC+HT, x86_num_cores will be 2 and kernel will set smp_num_siblings
to 2 (even though number of logical processors per physical package as
seen by cpuid.1.EBX.bits[23:16] will be 4).
Remember, smp_num_siblings in kernel will just represent HT logical siblings.
If CPU is just DC capable, cpuid.1.EBX.bits[23:16] will return '2' and
number of cores computation from cpuid.4.EAX.bits[31:26] will be 2.
And kernel will set x86_num_cores to 2 and smp_num_siblings will be set to 1
If CPU is just HT capable,cpuid.1.EBX.bits[23:16] will return '2' and
number of cores computation from cpuid.4.EAX.bits[31:26] will be 1.
And kernel will set x86_num_cores to 1 and smp_num_siblings will be set to 2.
> > Function 0000_0001[EBX]
> > EBX[23:16] Logical Processor Count. If CPUID Fn[8000_0001, 0000_0001][EDX:
> > HTT, ECX:
> > CMPLegacy] = 11b, then this field indicates the number of CPU cores in the
> > processor.
> > Otherwise, this field is reserved.
> >
> > what is intel value about cpuid(1) ebx [23:16], when the CPU is dual core,
> > but HT is disabled.
> > 1?
If CPU is DC+HT capable, but HT is disabled in bios, cpuid.1.EBX.bits[23:16]
will still be 4 and during bootup, kernel will figure out that no HT
siblings came up and will reset smp_num_siblings to 1.
I am planning to do more cleanup post 2.6.12, so that smp_num_siblings will
be moved to per cpuinfo.
thanks,
suresh
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way
2005-06-02 19:03 ` Dave Jones
@ 2005-06-03 19:26 ` Siddha, Suresh B
0 siblings, 0 replies; 16+ messages in thread
From: Siddha, Suresh B @ 2005-06-03 19:26 UTC (permalink / raw)
To: Dave Jones, YhLu, Andi Kleen, linux-kernel
On Thu, Jun 02, 2005 at 03:03:50PM -0400, Dave Jones wrote:
> On Thu, Jun 02, 2005 at 11:56:25AM -0700, YhLu wrote:
> > Really?, smp_num_siblings is global variable and initially is set 1.
>
> Why shouldn't it be ? It would only make sense to make it
> non-global if we supported a configuration where different
> CPUs had different numbers of siblings, which we don't.
> (And I'm fairly sure that AMD/Intel don't/won't either)
It will help if someone uses "maxcpus" boot param or if someone
wants to disable/enable certain logical siblings using HOTPLUG.
That is conceptually more cleaner too. Will do it post 2.6.12.
thanks,
suresh
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2005-06-03 19:27 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-02 3:26 2.6.12-rc5 is broken in nvidia Ck804 Opteron MB/with dual cor e dual way YhLu
2005-06-02 18:51 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2005-06-02 21:34 YhLu
2005-06-02 21:33 YhLu
2005-06-03 16:12 ` Andi Kleen
2005-06-02 21:15 YhLu
2005-06-02 20:42 YhLu
2005-06-03 16:09 ` Andi Kleen
2005-06-03 18:56 ` Siddha, Suresh B
2005-06-02 18:56 YhLu
2005-06-02 19:03 ` Dave Jones
2005-06-03 19:26 ` Siddha, Suresh B
2005-06-02 19:06 ` Ashok Raj
2005-06-02 18:55 YhLu
2005-06-02 3:16 YhLu
2005-06-02 18:50 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox