2002-04-29 18:49:56

by Andrew Theurer

[permalink] [raw]
Subject: Hyperthreading and physical/logical CPU identification

Hello all,

I would like to know if there is any way to confirm that I have
hyperthreading enabled, and my P4 CPUs are hyperthreaded. Actually, from
something like /proc/cpuinfo, I'd like to figure out if I am seeing 2/4
physical/logical processors, as a result from hyperthreading, or 4/4
physical/logical processors with no hyperthreading. I know, "If it's double
the number of physical processors, well you have hyperthreading enabled."
The problem is, I have 4 physical processors, but kernel.org kernels so far
do not recognize all of them. 2.4.18 will find 3, while 2.5.11 will find
only 2 (BIOS hyperthreading support off, no acpismp=force). However, on
2.5.11, if I enable hyperthreading (thru BIOS and acpismp=force, I see 4
processors.

I would very much like to believe that in this configuration, I am only
running on 2 physical, 4 logical processors, but I am getting a 31%
improvement (netbench) when hyperthreading is enabled. Thats why I want to
confirm I am really only using 2 physical, 4 logical processors. Is there
any way I can do this? (dmesg? /proc/cpuinfo?)

Thanks

Andrew Theurer


2002-04-29 19:40:53

by Andrew Grover

[permalink] [raw]
Subject: RE: Hyperthreading and physical/logical CPU identification

> From: Andrew Theurer [mailto:[email protected]]
> I would like to know if there is any way to confirm that I have
> hyperthreading enabled, and my P4 CPUs are hyperthreaded.
> Actually, from
> something like /proc/cpuinfo, I'd like to figure out if I am
> seeing 2/4
> physical/logical processors, as a result from hyperthreading, or 4/4
> physical/logical processors with no hyperthreading. I know,
> "If it's double
> the number of physical processors, well you have
> hyperthreading enabled."
> The problem is, I have 4 physical processors, but kernel.org
> kernels so far
> do not recognize all of them. 2.4.18 will find 3, while
> 2.5.11 will find
> only 2 (BIOS hyperthreading support off, no acpismp=force).
> However, on
> 2.5.11, if I enable hyperthreading (thru BIOS and
> acpismp=force, I see 4
> processors.
>
> I would very much like to believe that in this configuration,
> I am only
> running on 2 physical, 4 logical processors, but I am getting a 31%
> improvement (netbench) when hyperthreading is enabled. Thats
> why I want to
> confirm I am really only using 2 physical, 4 logical
> processors. Is there
> any way I can do this? (dmesg? /proc/cpuinfo?)

Well the two alternatives are, either A) turning on hyperthreading enabled
the two virtual processors or B) turning on hyperthreading somehow enabled
the other two processors, right?

I would think B would be highly unlikely.

Anyone else who actually has HT hardware care to comment? ;-)

Regards -- Andy

2002-04-29 20:17:56

by Andrew Theurer

[permalink] [raw]
Subject: Re: Hyperthreading and physical/logical CPU identification


> > I would very much like to believe that in this configuration,
> > I am only
> > running on 2 physical, 4 logical processors, but I am getting a 31%
> > improvement (netbench) when hyperthreading is enabled. Thats
> > why I want to
> > confirm I am really only using 2 physical, 4 logical
> > processors. Is there
> > any way I can do this? (dmesg? /proc/cpuinfo?)
>
> Well the two alternatives are, either A) turning on hyperthreading enabled
> the two virtual processors or B) turning on hyperthreading somehow enabled
> the other two processors, right?
>
> I would think B would be highly unlikely.
>
> Anyone else who actually has HT hardware care to comment? ;-)
>
> Regards -- Andy

Yes, those are the two alternatives. I agree B is unlikely, but honestly I
thought a 31% improvement from hyperthreading seemed unlikely as well.
Believe me, I am hoping situaiton A is the correct one!

-Andrew

2002-04-29 20:41:24

by Holzrichter, Bruce

[permalink] [raw]
Subject: RE: Hyperthreading and physical/logical CPU identification


>
> Yes, those are the two alternatives. I agree B is unlikely,
> but honestly I
> thought a 31% improvement from hyperthreading seemed unlikely
> as well.
> Believe me, I am hoping situaiton A is the correct one!
>
> -Andrew

Though I don't have a test platform, from published results, and depending
on what application, 31% for Hyperthreading enabled is within the realm of
possiblity.

B.

2002-04-29 21:43:38

by Martin J. Bligh

[permalink] [raw]
Subject: Re: Hyperthreading and physical/logical CPU identification

> The problem is, I have 4 physical processors, but kernel.org kernels so far
> do not recognize all of them. 2.4.18 will find 3, while 2.5.11 will find
> only 2 (BIOS hyperthreading support off, no acpismp=force). However, on
> 2.5.11, if I enable hyperthreading (thru BIOS and acpismp=force, I see 4
> processors.

When you say the kernel doesn't recognise all of the physical processors,
do you mean it doesn't see them in the MPS/ACPI table, or that they fail to
boot? Can you post your boot log?

I see you have a "us.ibm.com" email address ... is this machine an x440,
one of it's smaller brethren, or something totally different?

M.



2002-04-29 22:20:28

by J.A. Magallon

[permalink] [raw]
Subject: Re: Hyperthreading and physical/logical CPU identification


On 2002.04.29 Andrew Theurer wrote:
>
>> > I would very much like to believe that in this configuration,
>> > I am only
>> > running on 2 physical, 4 logical processors, but I am getting a 31%
>> > improvement (netbench) when hyperthreading is enabled. Thats
>> > why I want to
>> > confirm I am really only using 2 physical, 4 logical
>> > processors. Is there
>> > any way I can do this? (dmesg? /proc/cpuinfo?)
>>
>> Well the two alternatives are, either A) turning on hyperthreading enabled
>> the two virtual processors or B) turning on hyperthreading somehow enabled
>> the other two processors, right?
>>

I think you should post a more specific "this vs. that" comparison.
Guessing...

If you refer to:
- No hypethreading, box sees 2 processors, performance is 100%
- Hyperthreading active, box sees 4 processors, perf is _only_ 130%,
instead of 200%.

that is perfectly true. Each hyperthreaded pair of processors does
not perform like 2 independent ones, the share cache and other internal
things. So the usual performance improvement on a FOster Xeon is not
200%, but in the order of that 130% you get. Hyperthreading is like
'poor man' SMP.

But perhaps you alredy know all this and your question was following
other paths...

I will put my hands on a dual Xeon SuperMicro system, and will make
more tests, in a week or so...

Hope this helps.

--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre7-jam7 #1 SMP jue abr 25 00:19:56 CEST 2002 i686

2002-04-29 23:14:37

by Jauder Ho

[permalink] [raw]
Subject: RE: Hyperthreading and physical/logical CPU identification


Well, you could always take CPUs out... :)

--Jauder

On Mon, 29 Apr 2002, Grover, Andrew wrote:

> > From: Andrew Theurer [mailto:[email protected]]
> > I would like to know if there is any way to confirm that I have
> > hyperthreading enabled, and my P4 CPUs are hyperthreaded.
> > Actually, from
> > something like /proc/cpuinfo, I'd like to figure out if I am
> > seeing 2/4
> > physical/logical processors, as a result from hyperthreading, or 4/4
> > physical/logical processors with no hyperthreading. I know,
> > "If it's double
> > the number of physical processors, well you have
> > hyperthreading enabled."
> > The problem is, I have 4 physical processors, but kernel.org
> > kernels so far
> > do not recognize all of them. 2.4.18 will find 3, while
> > 2.5.11 will find
> > only 2 (BIOS hyperthreading support off, no acpismp=force).
> > However, on
> > 2.5.11, if I enable hyperthreading (thru BIOS and
> > acpismp=force, I see 4
> > processors.
> >
> > I would very much like to believe that in this configuration,
> > I am only
> > running on 2 physical, 4 logical processors, but I am getting a 31%
> > improvement (netbench) when hyperthreading is enabled. Thats
> > why I want to
> > confirm I am really only using 2 physical, 4 logical
> > processors. Is there
> > any way I can do this? (dmesg? /proc/cpuinfo?)
>
> Well the two alternatives are, either A) turning on hyperthreading enabled
> the two virtual processors or B) turning on hyperthreading somehow enabled
> the other two processors, right?
>
> I would think B would be highly unlikely.
>
> Anyone else who actually has HT hardware care to comment? ;-)
>
> Regards -- Andy
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>

2002-04-30 16:51:34

by Jack F. Vogel

[permalink] [raw]
Subject: Re: Hyperthreading and physical/logical CPU identification

On Monday 29 April 2002 03:41 pm, Martin J. Bligh wrote:
> > The problem is, I have 4 physical processors, but kernel.org kernels so
> > far do not recognize all of them. 2.4.18 will find 3, while 2.5.11 will
> > find only 2 (BIOS hyperthreading support off, no acpismp=force).
> > However, on 2.5.11, if I enable hyperthreading (thru BIOS and
> > acpismp=force, I see 4 processors.
>
> When you say the kernel doesn't recognise all of the physical processors,
> do you mean it doesn't see them in the MPS/ACPI table, or that they fail to
> boot? Can you post your boot log?
>
> I see you have a "us.ibm.com" email address ... is this machine an x440,
> one of it's smaller brethren, or something totally different?

If it is the x440 then the problem is the xapic and you need James Cleverdon's
summit patch for all processors to be seen and properly initialized. Email
James or me if you need a pointer.

--
Jack F. Vogel
IBM Linux Solutions
[email protected] (work)
[email protected] (home)