# Hyper threading or not?

## jesterspet

After diggin' around on a company computer.  I have a sneaky suspicion that I have been working on a hyper threading capable box.

Without opening the box, I would like to make sure that my suspicions are correct.

However, my diagnostics are giving me conflicting data. cpuinfo says I am dealing with a P4 with a hyper threading tag (the 'ht' in the flags):

```

$ cat /proc/cpuinfo

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 15

model           : 2

model name      : Intel(R) Pentium(R) 4 CPU 2.53GHz

stepping        : 7

cpu MHz         : 2524.035

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

bogomips        : 5033.16

```

Dmesg says I have a Xeon with HyperThreading turned off.

```

Processor #0 Pentium 4(tm) XEON(tm) APIC version 20

I/O APIC #1 Version 32 at 0xFEC00000.

Processors: 1

Kernel command line: BOOT_IMAGE=GenToo ro root=306

Initializing CPU#0

Detected 2524.035 MHz processor.

Console: colour dummy device 80x25

Calibrating delay loop... 5033.16 BogoMIPS

Memory: 514072k/523716k available (2066k kernel code, 9260k reserved, 670k data, 360k init, 0k highmem)

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode cache hash table entries: 32768 (order: 6, 262144 bytes)

Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)

Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)

Page-cache hash table entries: 131072 (order: 7, 524288 bytes)

Proc Config support by ptb@it.uc3m.es

proc config counted 2256 bytes in names

proc config counted 273 bytes in value handles

CPU: L1 I cache: 0K, L1 D cache: 8K

CPU: L2 cache: 512K

CPU: Hyper-Threading is disabled

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: bfebfbff 00000000 00000000 00000000

CPU:             Common caps: bfebfbff 00000000 00000000 00000000

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)

mtrr: detected mtrr type: Intel

CPU: L1 I cache: 0K, L1 D cache: 8K

CPU: L2 cache: 512K

CPU: Hyper-Threading is disabled

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: bfebfbff 00000000 00000000 00000000

CPU:             Common caps: bfebfbff 00000000 00000000 00000000

CPU0: Intel(R) Pentium(R) 4 CPU 2.53GHz stepping 07

per-CPU timeslice cutoff: 1462.35 usecs.

enabled ExtINT on CPU#0

ESR value before enabling vector: 00000000

ESR value after enabling vector: 00000000

Error: only one processor found.

ENABLING IO-APIC IRQs

Setting 1 in the phys_id_present_map

...changing IO-APIC physical APIC ID to 1 ... ok.

...changing IO-APIC physical APIC ID to 1 ... ok.

init IO_APIC IRQs

 IO-APIC (apicid-pin) 1-0, 1-13, 1-20, 1-21, 1-22 not connected.

..TIMER: vector=0x31 pin1=2 pin2=0

number of MP IRQ sources: 41.

number of IO-APIC #1 registers: 24.

testing the IO APIC.......................

```

Personally I dont care if it is a P4 or a Xeon.  What I do care about is whether or not I can get Hyper Threading enabled & working.

Since this is a new area for me, I am unsure on how to get my nice and shiny Gentoo box to use this nifty feature.  My kernel is built for SMP (old habit) even though I know this box is only a uni-proc.

Anyone got any helpful hints to help me acertain whether or not this box is actualy capable of Hyper Threading   :Question:    Or am I simply getting exicted over nothing.

If it is capable, I'll need some pointers in actualy getting it workin'

----------

## taskara

If it is a Xeon, then it will have hyperthreading support.

If it's a Pentium 4 it will NOT have hyperthreading support because the only model to have it is 3ghz or higher.

If it is a Xeon, just enabling SMP should give you hyperthreading support under linux.

I'd shutdown the machine, turn it on and check the boot up. If it's a Xeon, it will say so. If it says Pentium 4, it's not a Xeon and has no hyperthreading capability.

good luck!

----------

## allucid

looks to me like you have a Pentium 4 XEON processor.

----------

## pjp

Seems like I've heard rumors that some Intel chips now have the ability to turn on or off HT (and/or other features?).  Mind you, not so the user can do it.

----------

## barlad

What motherboard are you using? As far as I know, you also need HT support in your motherboard chipset in order to use HT capabilities.

I am using an ASUS mb with E7205 chipset, I have the possibility to enable HT in the bios. It works perfectly on a PIV 3,06Ghz.

If you do not have such an option, you may want to try upgrading your bios.

 *Quote:*   

> My kernel is built for SMP (old habit) even though I know this box is only a uni-proc

 

Enabling SMP is necessary if you want to use HT. The system does not really care wether it is virtual or physical.

----------

## bsolar

Here there's an interesting discussion.

----------

## jbrown

if you can't get the kernel to detect two processors then you should really use a non-SMP kernel otherwise you get a performance hit

----------

## jesterspet

 *bsolar wrote:*   

> Here there's an interesting discussion.

 

That discussion ended one post to soon for my taste.

They just get to the part of the 2.53 ES chips (of which I have) being capable of HT, and say that microcode from an HT enabled ES chip may work on a non-HT enabled ES chip.  However, there is no word one way or the other on wether or not it does work (either in an isolated case, or with some tweaking, or across the board).

 :Evil or Very Mad:   For now it seems that I am walking an uncertain path, in hopes of finding my answer about Hyperthreading.  :Evil or Very Mad: 

Anyone know where I can lay my hands on microcode from a HT enabled 2.53 ES chip?

How about a non-HT enabled 2.53 ES chip?

Any words of wisdom for installing IA32 microcode (I have never had the need to instal this in the past)?

----------

