2004-06-16 17:46:54

by Phy Prabab

[permalink] [raw]
Subject: Programtically tell diff between HT and real

Hello.

Is there a way to tell the difference between normal
processors and HT enabled processors? That is, does
the linux kernel know the difference and is there a
way to to know the difference.

Thank you for your time.
Phy



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail


2004-06-16 17:56:14

by Robert Love

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 2004-06-16 at 10:46 -0700, Phy Prabab wrote:

> Is there a way to tell the difference between normal
> processors and HT enabled processors? That is, does
> the linux kernel know the difference and is there a
> way to to know the difference.

Yah. Look at /proc/cpuinfo.

Virtual processors have different 'processor' values but the same
'physical id', while physical processors obviously have different values
for both.

Robert Love


2004-06-16 18:06:16

by lkml

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

> Is there a way to tell the difference between normal
> processors and HT enabled processors? That is, does
> the linux kernel know the difference and is there a
> way to to know the difference.

Execute the CPUID instruction with EAX=00000001h. I think HT-enabled cpus
should have bit 28 of the value returned in EDX set.

--
7:57PM up 134 days, 5:11, 1 user, load averages: 0.16, 0.18, 0.16

Every non-empty totally disconnected perfect compact metric space is
homeomorphic to the Cantor set.

2004-06-16 18:46:49

by Robert Love

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 2004-06-16 at 13:56 -0400, Robert Love wrote:

> Yah. Look at /proc/cpuinfo.
>
> Virtual processors have different 'processor' values but the same
> 'physical id', while physical processors obviously have different values
> for both.

Oh, and if you just want to see if a processor supports HT - the 'ht'
flag is set in 'flags' in /proc/cpuinfo.

Robert Love


2004-06-16 19:58:51

by David van Hoose

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real



Robert Love wrote:
> On Wed, 2004-06-16 at 13:56 -0400, Robert Love wrote:
>
>
>>Yah. Look at /proc/cpuinfo.
>>
>>Virtual processors have different 'processor' values but the same
>>'physical id', while physical processors obviously have different values
>>for both.
>
>
> Oh, and if you just want to see if a processor supports HT - the 'ht'
> flag is set in 'flags' in /proc/cpuinfo.

Not always true. I have a non-HT Pentium4, but I still have ht in my
flags. The same goes for a couple of dual Xeon's I work on at school.
Aparently Intel disabled the HT on a lot of Pentium 4 and Xeon chips,
but left the HT flag behind. My system even has the additional IO-APICs
too. Hence why everytime I boot a UP kernel, I get an 'unexpected
IO-APIC' message.

Cheers,
David

2004-06-16 20:01:08

by Phy Prabab

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

So, if I understand correctly, there is no way to know
definitively if a cpu is HT or not?

Thanks!
Phy

--- David van Hoose <[email protected]>
wrote:
>
>
> Robert Love wrote:
> > On Wed, 2004-06-16 at 13:56 -0400, Robert Love
> wrote:
> >
> >
> >>Yah. Look at /proc/cpuinfo.
> >>
> >>Virtual processors have different 'processor'
> values but the same
> >>'physical id', while physical processors obviously
> have different values
> >>for both.
> >
> >
> > Oh, and if you just want to see if a processor
> supports HT - the 'ht'
> > flag is set in 'flags' in /proc/cpuinfo.
>
> Not always true. I have a non-HT Pentium4, but I
> still have ht in my
> flags. The same goes for a couple of dual Xeon's I
> work on at school.
> Aparently Intel disabled the HT on a lot of Pentium
> 4 and Xeon chips,
> but left the HT flag behind. My system even has the
> additional IO-APICs
> too. Hence why everytime I boot a UP kernel, I get
> an 'unexpected
> IO-APIC' message.
>
> Cheers,
> David
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

2004-06-16 20:03:13

by Robert Love

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 2004-06-16 at 13:01 -0700, Phy Prabab wrote:

> So, if I understand correctly, there is no way to know
> definitively if a cpu is HT or not?

I'd do both of the things I said: test for HT, and then look for another
processor with the same physical id but a different processor value.

Robert Love


2004-06-16 20:49:19

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 16 Jun 2004, Robert Love wrote:

> On Wed, 2004-06-16 at 13:56 -0400, Robert Love wrote:
>
> > Yah. Look at /proc/cpuinfo.
> >
> > Virtual processors have different 'processor' values but the same
> > 'physical id', while physical processors obviously have different values
> > for both.
>
> Oh, and if you just want to see if a processor supports HT - the 'ht'
> flag is set in 'flags' in /proc/cpuinfo.
>
> Robert Love
>


processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 7
cpu MHz : 2793.087
cache size : 512 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 pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
^_______
bogomips : 5570.56

I would love to know how you turn in on! This is one of those
"latest-and-greatest" Intel D865PERL mother-boards and I've
even flashed the BIOS with the "latest-and-greatest".


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.


2004-06-16 21:36:14

by Andre Tomt

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

Richard B. Johnson wrote:
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
> ^_______
> bogomips : 5570.56
>
> I would love to know how you turn in on! This is one of those
> "latest-and-greatest" Intel D865PERL mother-boards and I've
> even flashed the BIOS with the "latest-and-greatest".

The usual way is to enable HT in BIOS, and use a SMP enabled kernel.

--
Cheers,
Andr? Tomt

2004-06-16 21:59:32

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 16 Jun 2004, Andre Tomt wrote:

> Richard B. Johnson wrote:
> > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> > mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
> > ^_______
> > bogomips : 5570.56
> >
> > I would love to know how you turn in on! This is one of those
> > "latest-and-greatest" Intel D865PERL mother-boards and I've
> > even flashed the BIOS with the "latest-and-greatest".
>
> The usual way is to enable HT in BIOS, and use a SMP enabled kernel.
>

It's a SMP kernel. There is no 'HT enable' in the BIOS setup.
In fact, there is very little that can be set and, it's even
very hard to convince it that I want to boot from a SCSI and
not from the first disk it finds. One has to remove the battery
to discharge the CMOS so it won't ignore the 'Del' key
on startup. It's a very bad BIOS or a very bad board, I
don't know which.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.


2004-06-17 08:56:05

by Mikael Pettersson

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 16 Jun 2004 17:58:26 -0400 (EDT), Richard B. Johnson wrote:
>> > I would love to know how you turn in on! This is one of those
>> > "latest-and-greatest" Intel D865PERL mother-boards and I've
>> > even flashed the BIOS with the "latest-and-greatest".
>>
>> The usual way is to enable HT in BIOS, and use a SMP enabled kernel.
>>
>
>It's a SMP kernel. There is no 'HT enable' in the BIOS setup.
>In fact, there is very little that can be set and, it's even
>very hard to convince it that I want to boot from a SCSI and
>not from the first disk it finds. One has to remove the battery
>to discharge the CMOS so it won't ignore the 'Del' key
>on startup. It's a very bad BIOS or a very bad board, I
>don't know which.

Or you forgot to enable ACPI in the kernel.
For some reason, the MP tables aren't capable of
describing HT siblings, so the BIOSen do that
via the ACPI tables instead.

2004-06-17 08:55:14

by Mikael Pettersson

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Wed, 16 Jun 2004 13:01:02 -0700 (PDT), Phy Prabab wrote:
>So, if I understand correctly, there is no way to know
>definitively if a cpu is HT or not?

Of course there is. Intel's documentation, in
particular the IA32 Volume 2 and 3 manuals and
application note 485 (CPUID) describe this. They
are downloadable as PDFs from developer.intel.com.

Use CPUID to retrieve the "number of siblings"
value. >1 implies HT actually enabled.

2004-06-17 11:22:26

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Thu, 17 Jun 2004, Mikael Pettersson wrote:

> On Wed, 16 Jun 2004 17:58:26 -0400 (EDT), Richard B. Johnson wrote:
> >> > I would love to know how you turn in on! This is one of those
> >> > "latest-and-greatest" Intel D865PERL mother-boards and I've
> >> > even flashed the BIOS with the "latest-and-greatest".
> >>
> >> The usual way is to enable HT in BIOS, and use a SMP enabled kernel.
> >>
> >
> >It's a SMP kernel. There is no 'HT enable' in the BIOS setup.
> >In fact, there is very little that can be set and, it's even
> >very hard to convince it that I want to boot from a SCSI and
> >not from the first disk it finds. One has to remove the battery
> >to discharge the CMOS so it won't ignore the 'Del' key
> >on startup. It's a very bad BIOS or a very bad board, I
> >don't know which.
>
> Or you forgot to enable ACPI in the kernel.
> For some reason, the MP tables aren't capable of
> describing HT siblings, so the BIOSen do that
> via the ACPI tables instead.
>

I'll look, thanks.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.


2004-06-17 11:52:47

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

On Thu, 17 Jun 2004, Richard B. Johnson wrote:

> On Thu, 17 Jun 2004, Mikael Pettersson wrote:
>
> > On Wed, 16 Jun 2004 17:58:26 -0400 (EDT), Richard B. Johnson wrote:
> > >> > I would love to know how you turn in on! This is one of those
> > >> > "latest-and-greatest" Intel D865PERL mother-boards and I've
> > >> > even flashed the BIOS with the "latest-and-greatest".
> > >>
> > >> The usual way is to enable HT in BIOS, and use a SMP enabled kernel.
> > >>
> > >
> > >It's a SMP kernel. There is no 'HT enable' in the BIOS setup.
> > >In fact, there is very little that can be set and, it's even
> > >very hard to convince it that I want to boot from a SCSI and
> > >not from the first disk it finds. One has to remove the battery
> > >to discharge the CMOS so it won't ignore the 'Del' key
> > >on startup. It's a very bad BIOS or a very bad board, I
> > >don't know which.
> >
> > Or you forgot to enable ACPI in the kernel.
> > For some reason, the MP tables aren't capable of
> > describing HT siblings, so the BIOSen do that
> > via the ACPI tables instead.
> >
>
> I'll look, thanks.
>
>

I enabled ACPI, recompiled, etc. Rebooted, still just one CPU
with another hidden inside that can't get out!


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.


2004-06-18 03:31:24

by Robert Hancock

[permalink] [raw]
Subject: Re: Programtically tell diff between HT and real

If that 2.8 GHz CPU is not 800 MHz FSB, then it's not HT-capable regardless
of what the feature flags say (as far as I know, most P4 CPUs show HT
support in the feature flags even if it doesn't really support it).


----- Original Message -----
From: "Richard B. Johnson" <[email protected]>
Newsgroups: fa.linux.kernel
To: "Andre Tomt" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, June 16, 2004 4:02 PM
Subject: Re: Programtically tell diff between HT and real


> On Wed, 16 Jun 2004, Andre Tomt wrote:
>
> > Richard B. Johnson wrote:
> > > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> > > mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
cid
> > > ^_______
> > > bogomips : 5570.56
> > >
> > > I would love to know how you turn in on! This is one of those
> > > "latest-and-greatest" Intel D865PERL mother-boards and I've
> > > even flashed the BIOS with the "latest-and-greatest".
> >
> > The usual way is to enable HT in BIOS, and use a SMP enabled kernel.
> >
>
> It's a SMP kernel. There is no 'HT enable' in the BIOS setup.
> In fact, there is very little that can be set and, it's even
> very hard to convince it that I want to boot from a SCSI and
> not from the first disk it finds. One has to remove the battery
> to discharge the CMOS so it won't ignore the 'Del' key
> on startup. It's a very bad BIOS or a very bad board, I
> don't know which.
>
>
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
> Note 96.31% of all statistics are fiction.
>
>
> -
> 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/