public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Wrong number of cpus detected/reported
@ 2003-06-10 18:50 José Francisco Ribeiro Neto
  2003-06-10 20:17 ` David Schwartz
  0 siblings, 1 reply; 16+ messages in thread
From: José Francisco Ribeiro Neto @ 2003-06-10 18:50 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]

Hi,

first of all please apologize me because I didn't subscribe the list. I 
really even don't know if this list is the appropriate place to have my 
question discussed but I didn't found any better one.

I installed a RedHat 7.1 system on a 4 way 1.4 Gz Compaq DL580 server 
with kernel 2.4.2 and everything goes right. Because of some other 
prerequisite needs I had to upgrade the kernel to 2.4.9-34.

After the upgrade the system is reporting that the machine has 8 cpu 
instead of 4. I have been looking for some kind of information on the 
Internet (www.google.com/linux) about that but I didn't have success.

Does anybody can tell me if I will face some major problem and why the 
system is detecting (or only reporting) the wrong number of cpus ? There 
is anything that I can do to have my system detecting the right number 
of cpus ?

Attached there are a tar.gz file containing :

nohup.out => standard output from make bzImage
modules.out => standard output from make modules
modules.err => standard error from make modules
cpuinfo => /proc/cpuinfo

The kernel was compiled using the kernel.....-enterprise config from 
/usr/src/linux-2.4/configs (smp=yes, highmem=64M)

Thanks in advance.

[-- Attachment #2: files.tar.gz --]
[-- Type: application/x-gzip, Size: 41242 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: Wrong number of cpus detected/reported
  2003-06-10 18:50 José Francisco Ribeiro Neto
@ 2003-06-10 20:17 ` David Schwartz
  2003-06-10 21:08   ` Timothy Miller
  0 siblings, 1 reply; 16+ messages in thread
From: David Schwartz @ 2003-06-10 20:17 UTC (permalink / raw)
  To: xyko_ig, linux-kernel


> Hi,
>
> first of all please apologize me because I didn't subscribe the list. I
> really even don't know if this list is the appropriate place to have my
> question discussed but I didn't found any better one.
>
> I installed a RedHat 7.1 system on a 4 way 1.4 Gz Compaq DL580 server
> with kernel 2.4.2 and everything goes right. Because of some other
> prerequisite needs I had to upgrade the kernel to 2.4.9-34.
>
> After the upgrade the system is reporting that the machine has 8 cpu
> instead of 4. I have been looking for some kind of information on the
> Internet (www.google.com/linux) about that but I didn't have success.

	This is correct. The machine has 8 logical CPUs implemented inside 4
physical CPUs. For more information, search Intel's web pages about
'hyperthreading'.

	DS



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: Wrong number of cpus detected/reported
       [not found] <434747C01D5AC443809D5FC5405011310B7169@bobcat.unickz.com>
@ 2003-06-10 20:21 ` John Appleby
  2003-06-10 20:36   ` Samuel Flory
  0 siblings, 1 reply; 16+ messages in thread
From: John Appleby @ 2003-06-10 20:21 UTC (permalink / raw)
  To: xyko_ig, linux-kernel

> After the upgrade the system is reporting that the machine has 8 cpu
> instead of 4. I have been looking for some kind of information on the
> Internet (www.google.com/linux) about that but I didn't have success.

I suspect that it is identifying 4 Xeon CPUs with Hyperthreading, which
will correctly double the amount of processors your kernel thinks you
have. Intel's Hyperthreading

This ought to be a good thing... the only thing I don't quite understand
is that I thought Hyperthreading was added in 2.4.17.

Regards,

John



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: Wrong number of cpus detected/reported
@ 2003-06-10 20:35 Lauro, John
  0 siblings, 0 replies; 16+ messages in thread
From: Lauro, John @ 2003-06-10 20:35 UTC (permalink / raw)
  To: xyko_ig, linux-kernel

As someone else mentioned, it is probably hyper threading.  Run 'top'
and see if you get per cpu stats.  If it is hyperthreading, you should
be able to disable it in the BIOS.

IMO, hyperthreading is evil on an SMP box.  The system doesn't know
that not all CPUs are not created equal, and so if you have 4 CPU
intensive processes, then you have a good chance that 2 of the
processes will run at a reduced rate on the same CPU and one (or 2)
CPUs stay mostly idle...  All my benchmarks gave lower performance
with hyperthreading enabled.  I forget the kernel version, but I think
it was 2.4.20, might have been 2.4.18.

On a single CPU box, hyperthreading is probably a plus. I wonder if
2.5 handles hyperthreading any better. 

> -----Original Message-----
> From: José Francisco Ribeiro Neto [mailto:xyko@ipiranga.com.br]
> Sent: Tuesday, June 10, 2003 2:51 PM
> To: linux-kernel@vger.kernel.org
> Subject: Wrong number of cpus detected/reported
> Importance: High
> 
> Hi,
> 
> first of all please apologize me because I didn't subscribe the
list. I
> really even don't know if this list is the appropriate place to have
my
> question discussed but I didn't found any better one.
> 
> I installed a RedHat 7.1 system on a 4 way 1.4 Gz Compaq DL580
server
> with kernel 2.4.2 and everything goes right. Because of some other
> prerequisite needs I had to upgrade the kernel to 2.4.9-34.
> 
> After the upgrade the system is reporting that the machine has 8 cpu
> instead of 4. I have been looking for some kind of information on
the
> Internet (www.google.com/linux) about that but I didn't have
success.
> 
> Does anybody can tell me if I will face some major problem and why
the
> system is detecting (or only reporting) the wrong number of cpus ?
There
> is anything that I can do to have my system detecting the right
number
> of cpus ?
> 
> Attached there are a tar.gz file containing :
> 
> nohup.out => standard output from make bzImage
> modules.out => standard output from make modules
> modules.err => standard error from make modules
> cpuinfo => /proc/cpuinfo
> 
> The kernel was compiled using the kernel.....-enterprise config from
> /usr/src/linux-2.4/configs (smp=yes, highmem=64M)
> 
> Thanks in advance.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 20:21 ` Wrong number of cpus detected/reported John Appleby
@ 2003-06-10 20:36   ` Samuel Flory
  2003-06-10 21:04     ` Steven Cole
  0 siblings, 1 reply; 16+ messages in thread
From: Samuel Flory @ 2003-06-10 20:36 UTC (permalink / raw)
  To: John Appleby; +Cc: xyko_ig, linux-kernel

John Appleby wrote:

>>After the upgrade the system is reporting that the machine has 8 cpu
>>instead of 4. I have been looking for some kind of information on the
>>Internet (www.google.com/linux) about that but I didn't have success.
>>    
>>
>
>I suspect that it is identifying 4 Xeon CPUs with Hyperthreading, which
>will correctly double the amount of processors your kernel thinks you
>have. Intel's Hyperthreading
>
>This ought to be a good thing... the only thing I don't quite understand
>is that I thought Hyperthreading was added in 2.4.17.
>
>  
>

  Red Hat enabled basic hyperthreading support in their 2.4.9 eratta 
kernels some where along the line.  I just didn't think 1.4 Xeons did 
HT.  (Maybe the MP Xeons are different from the DP xeons.)

-- 
There is no such thing as obsolete hardware.
Merely hardware that other people don't want.
(The Second Rule of Hardware Acquisition)
Sam Flory  <sflory@rackable.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 20:36   ` Samuel Flory
@ 2003-06-10 21:04     ` Steven Cole
  2003-06-10 21:35       ` Alan Cox
  0 siblings, 1 reply; 16+ messages in thread
From: Steven Cole @ 2003-06-10 21:04 UTC (permalink / raw)
  To: Samuel Flory; +Cc: John Appleby, xyko_ig, linux-kernel

On Tue, 2003-06-10 at 14:36, Samuel Flory wrote:
> John Appleby wrote:
> 
> >>After the upgrade the system is reporting that the machine has 8 cpu
> >>instead of 4. I have been looking for some kind of information on the
> >>Internet (www.google.com/linux) about that but I didn't have success.
> >>    
> >>
> >
> >I suspect that it is identifying 4 Xeon CPUs with Hyperthreading, which
> >will correctly double the amount of processors your kernel thinks you
> >have. Intel's Hyperthreading
> >
> >This ought to be a good thing... the only thing I don't quite understand
> >is that I thought Hyperthreading was added in 2.4.17.
> >
> >  
> >
> 
>   Red Hat enabled basic hyperthreading support in their 2.4.9 eratta 
> kernels some where along the line.  I just didn't think 1.4 Xeons did 
> HT.  (Maybe the MP Xeons are different from the DP xeons.)

His does. From his cpuinfo:

processor	: 7
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Xeon(TM) CPU 1.40GHz
stepping	: 1
cpu MHz		: 1399.982
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips	: 2798.38

See that ht flag near the end?

Don't know why he doesn't go with RH 9 or RH AS though.

Steven


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 20:17 ` David Schwartz
@ 2003-06-10 21:08   ` Timothy Miller
  0 siblings, 0 replies; 16+ messages in thread
From: Timothy Miller @ 2003-06-10 21:08 UTC (permalink / raw)
  To: David Schwartz; +Cc: xyko_ig, linux-kernel



David Schwartz wrote:

> 
> 	This is correct. The machine has 8 logical CPUs implemented inside 4
> physical CPUs. For more information, search Intel's web pages about
> 'hyperthreading'.
> 


But if the kernel doesn't have HT support, then it won't necessarily 
balance loads properly.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: Wrong number of cpus detected/reported
       [not found] <434747C01D5AC443809D5FC5405011310B7190@bobcat.unickz.com>
@ 2003-06-10 21:11 ` John Appleby
  0 siblings, 0 replies; 16+ messages in thread
From: John Appleby @ 2003-06-10 21:11 UTC (permalink / raw)
  To: 'Samuel Flory', John Appleby; +Cc: xyko_ig, linux-kernel

>   Red Hat enabled basic hyperthreading support in their 2.4.9 eratta
> kernels some where along the line.  I just didn't think 1.4 Xeons did
> HT.  (Maybe the MP Xeons are different from the DP xeons.)

The ML570 has the Gallatin CPU in it which does support HT.

Regards,

JA



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 21:04     ` Steven Cole
@ 2003-06-10 21:35       ` Alan Cox
  2003-06-10 21:52         ` Steven Cole
  0 siblings, 1 reply; 16+ messages in thread
From: Alan Cox @ 2003-06-10 21:35 UTC (permalink / raw)
  To: Steven Cole
  Cc: Samuel Flory, John Appleby, xyko_ig, Linux Kernel Mailing List

> wp		: yes
> flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> bogomips	: 2798.38
> 
> See that ht flag near the end?

The ht flag means the ht facilities (mtrr etc) are present, doesnt mean
HT necessarily is


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 21:35       ` Alan Cox
@ 2003-06-10 21:52         ` Steven Cole
  2003-06-10 22:06           ` Alan Cox
  2003-06-10 22:16           ` mikpe
  0 siblings, 2 replies; 16+ messages in thread
From: Steven Cole @ 2003-06-10 21:52 UTC (permalink / raw)
  To: Alan Cox; +Cc: Samuel Flory, John Appleby, xyko_ig, Linux Kernel Mailing List

On Tue, 2003-06-10 at 15:35, Alan Cox wrote:
> > wp		: yes
> > flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> > bogomips	: 2798.38
> > 
> > See that ht flag near the end?
> 
> The ht flag means the ht facilities (mtrr etc) are present, doesnt mean
> HT necessarily is

Is there a reliable method, apart from knowing 'a priori' the mapping
from CPU models and stepping to hyperthreading capability?

Steven


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 21:52         ` Steven Cole
@ 2003-06-10 22:06           ` Alan Cox
  2003-06-10 22:16           ` mikpe
  1 sibling, 0 replies; 16+ messages in thread
From: Alan Cox @ 2003-06-10 22:06 UTC (permalink / raw)
  To: Steven Cole
  Cc: Samuel Flory, John Appleby, xyko_ig, Linux Kernel Mailing List

On Maw, 2003-06-10 at 22:52, Steven Cole wrote:
> Is there a reliable method, apart from knowing 'a priori' the mapping
> from CPU models and stepping to hyperthreading capability?

Except for building a collection of databooks and "specification updates" none
I know of. 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 21:52         ` Steven Cole
  2003-06-10 22:06           ` Alan Cox
@ 2003-06-10 22:16           ` mikpe
  2003-06-11 16:17             ` Timothy Miller
  1 sibling, 1 reply; 16+ messages in thread
From: mikpe @ 2003-06-10 22:16 UTC (permalink / raw)
  To: Steven Cole
  Cc: Alan Cox, Samuel Flory, John Appleby, xyko_ig,
	Linux Kernel Mailing List

Steven Cole writes:
 > On Tue, 2003-06-10 at 15:35, Alan Cox wrote:
 > > > wp		: yes
 > > > flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
 > > > bogomips	: 2798.38
 > > > 
 > > > See that ht flag near the end?
 > > 
 > > The ht flag means the ht facilities (mtrr etc) are present, doesnt mean
 > > HT necessarily is
 > 
 > Is there a reliable method, apart from knowing 'a priori' the mapping
 > from CPU models and stepping to hyperthreading capability?

Yes. Execute cpuid with eax=1 on each CPU. ebx describes among other things
the number of threads and which thread you're on. If you ever find yourself
on a non-zero thread, you have HT.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: Wrong number of cpus detected/reported
@ 2003-06-11  0:04 Lauro, John
  0 siblings, 0 replies; 16+ messages in thread
From: Lauro, John @ 2003-06-11  0:04 UTC (permalink / raw)
  To: Timothy Miller; +Cc: linux-kernel

What kernels balance the loads properly?  When I did some simple tests
with a dual Xeon 2.4, I couldn't get it Linux to balance properly.
About 30% of the time it would be off balance with two CPU bound
processes, and that is about the statistical rate.  I think that was
with 2.4.20, but might have been 2.4.18.  With 3 processes, one would
always get an unfair advantage compared to the other two.

> -----Original Message-----
> From: Timothy Miller [mailto:miller@techsource.com]
> Sent: Tuesday, June 10, 2003 5:09 PM
> To: David Schwartz
> Cc: xyko_ig@ig.com.br; linux-kernel@vger.kernel.org
> Subject: Re: Wrong number of cpus detected/reported
> 
> But if the kernel doesn't have HT support, then it won't necessarily
> balance loads properly.
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-10 22:16           ` mikpe
@ 2003-06-11 16:17             ` Timothy Miller
  2003-06-11 16:28               ` mikpe
  2003-06-11 21:26               ` Con Kolivas
  0 siblings, 2 replies; 16+ messages in thread
From: Timothy Miller @ 2003-06-11 16:17 UTC (permalink / raw)
  To: mikpe
  Cc: Steven Cole, Alan Cox, Samuel Flory, John Appleby, xyko_ig,
	Linux Kernel Mailing List



mikpe@csd.uu.se wrote:
> Steven Cole writes:
>  > On Tue, 2003-06-10 at 15:35, Alan Cox wrote:
>  > > > wp		: yes
>  > > > flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
>  > > > bogomips	: 2798.38
>  > > > 
>  > > > See that ht flag near the end?
>  > > 
>  > > The ht flag means the ht facilities (mtrr etc) are present, doesnt mean
>  > > HT necessarily is
>  > 
>  > Is there a reliable method, apart from knowing 'a priori' the mapping
>  > from CPU models and stepping to hyperthreading capability?
> 
> Yes. Execute cpuid with eax=1 on each CPU. ebx describes among other things
> the number of threads and which thread you're on. If you ever find yourself
> on a non-zero thread, you have HT.


I presume, however, that to get into a non-zero thread, you have to turn 
HT on.  That is, when the machine first powers up, there is nothing for 
the second thread to execute, so it's turned off.  (I'm assuming 
something similar for SMP boxes.)  So, the real question should be, 
before you attempt to turn on HT, how do you find out whether or you CAN 
turn on HT.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-11 16:17             ` Timothy Miller
@ 2003-06-11 16:28               ` mikpe
  2003-06-11 21:26               ` Con Kolivas
  1 sibling, 0 replies; 16+ messages in thread
From: mikpe @ 2003-06-11 16:28 UTC (permalink / raw)
  To: Timothy Miller
  Cc: Steven Cole, Alan Cox, Samuel Flory, John Appleby, xyko_ig,
	Linux Kernel Mailing List

Timothy Miller writes:
 > 
 > 
 > mikpe@csd.uu.se wrote:
 > > Steven Cole writes:
 > >  > On Tue, 2003-06-10 at 15:35, Alan Cox wrote:
 > >  > > > wp		: yes
 > >  > > > flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
 > >  > > > bogomips	: 2798.38
 > >  > > > 
 > >  > > > See that ht flag near the end?
 > >  > > 
 > >  > > The ht flag means the ht facilities (mtrr etc) are present, doesnt mean
 > >  > > HT necessarily is
 > >  > 
 > >  > Is there a reliable method, apart from knowing 'a priori' the mapping
 > >  > from CPU models and stepping to hyperthreading capability?
 > > 
 > > Yes. Execute cpuid with eax=1 on each CPU. ebx describes among other things
 > > the number of threads and which thread you're on. If you ever find yourself
 > > on a non-zero thread, you have HT.
 > 
 > 
 > I presume, however, that to get into a non-zero thread, you have to turn 
 > HT on.  That is, when the machine first powers up, there is nothing for 
 > the second thread to execute, so it's turned off.  (I'm assuming 
 > something similar for SMP boxes.)  So, the real question should be, 
 > before you attempt to turn on HT, how do you find out whether or you CAN 
 > turn on HT.

If the CPUs can't do it at all, #threads < 2 by the definition of CPUID.

I don't know that happens to the CPUID #threads value if the CPUs are
HT-capable but BIOS has disabled HT. (I'm not going to reboot our
Dual Xeon just to check this.) Why does it matter? If people BIOS-disable
HT in their Xeon boxes they get what they deserve. (Which is not to
say that doing so is wrong. HT isn't always a gain.)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Wrong number of cpus detected/reported
  2003-06-11 16:17             ` Timothy Miller
  2003-06-11 16:28               ` mikpe
@ 2003-06-11 21:26               ` Con Kolivas
  1 sibling, 0 replies; 16+ messages in thread
From: Con Kolivas @ 2003-06-11 21:26 UTC (permalink / raw)
  To: Timothy Miller, mikpe
  Cc: Steven Cole, Alan Cox, Samuel Flory, John Appleby, xyko_ig,
	Linux Kernel Mailing List

On Thu, 12 Jun 2003 02:17, Timothy Miller wrote:
> mikpe@csd.uu.se wrote:
> > Steven Cole writes:
> >  > On Tue, 2003-06-10 at 15:35, Alan Cox wrote:
> >  > > > wp		: yes
> >  > > > flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov
> >  > > > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm bogomips	:
> >  > > > 2798.38
> >  > > >
> >  > > > See that ht flag near the end?
> >  > >
> >  > > The ht flag means the ht facilities (mtrr etc) are present, doesnt
> >  > > mean HT necessarily is
> >  >
> >  > Is there a reliable method, apart from knowing 'a priori' the mapping
> >  > from CPU models and stepping to hyperthreading capability?
> >
> > Yes. Execute cpuid with eax=1 on each CPU. ebx describes among other
> > things the number of threads and which thread you're on. If you ever find
> > yourself on a non-zero thread, you have HT.
>
> I presume, however, that to get into a non-zero thread, you have to turn
> HT on.  That is, when the machine first powers up, there is nothing for
> the second thread to execute, so it's turned off.  (I'm assuming
> something similar for SMP boxes.)  So, the real question should be,
> before you attempt to turn on HT, how do you find out whether or you CAN
> turn on HT.
>
http://sourceforge.net/projects/cpucounter/

Con


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-06-11 21:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <434747C01D5AC443809D5FC5405011310B7169@bobcat.unickz.com>
2003-06-10 20:21 ` Wrong number of cpus detected/reported John Appleby
2003-06-10 20:36   ` Samuel Flory
2003-06-10 21:04     ` Steven Cole
2003-06-10 21:35       ` Alan Cox
2003-06-10 21:52         ` Steven Cole
2003-06-10 22:06           ` Alan Cox
2003-06-10 22:16           ` mikpe
2003-06-11 16:17             ` Timothy Miller
2003-06-11 16:28               ` mikpe
2003-06-11 21:26               ` Con Kolivas
2003-06-11  0:04 Lauro, John
     [not found] <434747C01D5AC443809D5FC5405011310B7190@bobcat.unickz.com>
2003-06-10 21:11 ` John Appleby
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10 20:35 Lauro, John
2003-06-10 18:50 José Francisco Ribeiro Neto
2003-06-10 20:17 ` David Schwartz
2003-06-10 21:08   ` Timothy Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox