# question about /proc/cpuinfo for hyperthread support

## henryzhou

Hi All,

I have a pentium4 2.8G cpu which supports hyperthread feature. And I've compiled smp and hyperthread support in my kernel 2.6.12-gentoo-r9. 

But each time I run cat /proc/cpuinfo I could only see one cpu there. Is it correct?

Here is the display of my /proc/cpuinfo

```

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 15

model           : 2

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

stepping        : 9

cpu MHz         : 2790.344

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 xtpr

bogomips        : 5505.02

```

----------

## Section_8

If you have hyperthreading enabled, cat /proc/cpuinfo should show 2 cpus.

Did you enable hyperthreading in your bios?

In my kernel config I have:

Processor type and features

[*] Symmetric multi-processing support 

(2)   Maximum number of CPUs (2-255)

[*]   SMT (Hyperthreading) scheduler support

----------

## Daniel.Liao

I meet the same problem and It is sure that I have enable, 

My configure is:

```

[*] HPET Timer Support

[*] Symmetric multi-processing support 

(8)   Maximum number of CPUs (2-255) 

[*]   SMT (Hyperthreading) scheduler support

```

any other suggestion?

----------

## henryzhou

Yes, i've done that.

I wonder whether it would be the problem of setting maximum number to 8 instead of 2?

Thank you.

----------

## Daniel.Liao

I have also try to set it to 2, but same result  :Wink: 

----------

## Section_8

Have you tried booting a live CD that supports hyperthreading?  I *think* knoppix does.  I'll try with the gentoo 2005.0 cd when I get home tonight.

If you boot a live CD that you know supports hyperthreading, that should tell you whether your bios or kernel config is the problem.

----------

## Section_8

Ok - when I boot up the gentoo kernel on the 2005.0 install CD, cat /proc/cpuinfo shows 2 cpus on my box.

----------

## syg00

When I had this problem, it turned out to be a BIOS issue. The BIOS was advertised as supporting H/T, but the BIOS level it shipped with didn't handle my chip.

Only found out by going to the vendor site and looking at the changelog for each BIOS release.

Flashed to latest, and it all started working.

----------

## henryzhou

Sorry, but the problem is when I use fedora core 3/4, it actually shows 2 cpus. But why in the gentoo system which compiled by myself there is only one?

----------

## ajaygautam

henry, is this still an issue, or did you find a solution ?

----------

## Bob P

i'm having the same problem as henry.  i've properly configured my kernel to support SMP, and my new P4 box isn't recognizing the virtual processor/hyperthreading feature.

kernel config info:

```

[*] HPET Timer Support

[*] Symmetric multi-processing support

(2)   Maximum number of CPUs (2-255)

[*]   SMT (Hyperthreading) scheduler support
```

CPU info:

```
# cat /proc/cpuinfo

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 15

model           : 2

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

stepping        : 7

cpu MHz         : 2403.464

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 xtpr

bogomips        : 4734.97
```

dmesg:

```

Linux version 2.6.12-gentoo-r10 (root@todland) (gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)) #2 SMP Fri Sep 23 22:05:18 CDT 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)

 BIOS-e820: 000000003fff0000 - 000000003fff3000 (ACPI NVS)

 BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)

Warning only 896MB will be used.

Use a HIGHMEM enabled kernel.

896MB LOWMEM available.

found SMP MP-table at 000f5a10

On node 0 totalpages: 229376

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 225280 pages, LIFO batch:31

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.2 present.

ACPI: RSDP (v000 IntelR                                ) @ 0x000f74c0

ACPI: RSDT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff3000

ACPI: FADT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff3040

ACPI: MADT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff7040

ACPI: DSDT (v001 INTELR AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000

ACPI: Local APIC address 0xfee00000

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)

Processor #0 15:2 APIC version 20

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled)

ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])

ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)

ACPI: IRQ0 used by override.

ACPI: IRQ2 used by override.

ACPI: IRQ9 used by override.

Enabling APIC mode:  Flat.  Using 1 I/O APICs

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 40000000 (gap: 40000000:bec00000)

Built 1 zonelists

Kernel command line: ro root=/dev/hda3 video=nvidiafb:ywrap,pmipal,1280x1024-24@75 splash=verbose,theme:emergence CONSOLE=/dev/tty1

mapped APIC to ffffd000 (fee00000)

mapped IOAPIC to ffffc000 (fec00000)

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 65536 bytes)

Detected 2403.348 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

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

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

Memory: 904316k/917504k available (3019k kernel code, 12676k reserved, 1110k data, 216k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 4734.97 BogoMIPS (lpj=2367488)

Mount-cache hash table entries: 512

CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000 00004400 00000000 00000000

CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000 00004400 00000000 00000000

CPU: Trace cache: 12K uops, L1 D cache: 8K

CPU: L2 cache: 512K

CPU: Hyper-Threading is disabled

CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080 00004400 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU0: Intel P4/Xeon Extended MCE MSRs (12) available

CPU0: Thermal monitoring enabled

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

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

Total of 1 processors activated (4734.97 BogoMIPS).

ENABLING IO-APIC IRQs

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

Brought up 1 CPUs

CPU0 attaching sched-domain:

 domain 0: span 1

  groups: 1

  domain 1: span 1

   groups: 1

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb240, last bus=2

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050309

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1

Boot video device is 0000:01:00.0

PCI: Transparent bridge - 0000:00:1e.0

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNK0] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNK1] (IRQs *3 4 5 6 7 9 10 11 12 14 15)

ACPI: Power Resource [PFAN] (off)

Linux Plug and Play Support v0.97 (c) Adam Belay

pnp: PnP ACPI init

pnp: PnP ACPI: found 11 devices

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

pnp: 00:01: ioport range 0x400-0x4bf could not be reserved

Machine check exception polling timer started.

audit: initializing netlink socket (disabled)

audit(1127531494.072:0): initialized

inotify device minor=63

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

lp: driver loaded but no devices found

Linux agpgart interface v0.101 (c) Dave Jones

[drm] Initialized drm 1.0.0 20040925

ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16

nvidiafb: nVidia device/chipset 10DE0181

nvidiafb: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x]

nvidiafb: CRTC0 found

nvidiafb: CRTC1 not found

nvidiafb: EDID found from BUS1

nvidiafb: CRTC 0 appears to have a CRT attached

nvidiafb: Using CRT on CRTC 0

nvidiafb: MTRR set to ON

nvidiafb: PCI nVidia NV18 framebuffer (64MB @ 0xD0000000)

ACPI: Power Button (FF) [PWRF]

ACPI: Fan [FAN] (off)

ACPI: Thermal Zone [THRM] (40 C)

PNP: PS/2 controller doesn't have AUX irq; using default 0xc

PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 112

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP(,...)]

lp0: using parport0 (interrupt-driven).

mice: PS/2 mouse device common for all mice

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

8139too Fast Ethernet driver 0.9.27

ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 19 (level, low) -> IRQ 19

eth0: RealTek RTL8139 at 0xc000, 00:50:8d:4b:b9:63, IRQ 19

eth0:  Identified 8139 chip type 'RTL-8101'

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ICH4: IDE controller at PCI slot 0000:00:1f.1

ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18

ICH4: chipset revision 2

ICH4: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:pio

Probing IDE interface ide0...

input: AT Translated Set 2 keyboard on isa0060/serio0

hda: MAXTOR 6L040L2, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

hdc: LITE-ON LTR-52246S, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

hda: max request size: 128KiB

hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(100)

hda: cache flushes supported

 hda: hda1 hda2 hda3

hdc: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

libata version 1.11 loaded.

ieee1394: raw1394: /dev/raw1394 device initialized

usbmon: debugs is not available

ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 23

PCI: Setting latency timer of device 0000:00:1d.7 to 64

ehci_hcd 0000:00:1d.7: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller

ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:1d.7: irq 23, io mem 0xdc000000

PCI: cache line size of 128 is not supported by device 0000:00:1d.7

ehci_hcd 0000:00:1d.7: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 6 ports detected

USB Universal Host Controller Interface driver v2.2

ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:00:1d.0 to 64

uhci_hcd 0000:00:1d.0: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1

uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2

uhci_hcd 0000:00:1d.0: irq 16, io base 0x0000d800

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 19

PCI: Setting latency timer of device 0000:00:1d.1 to 64

uhci_hcd 0000:00:1d.1: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2

uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3

uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000d000

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18

PCI: Setting latency timer of device 0000:00:1d.2 to 64

uhci_hcd 0000:00:1d.2: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3

uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4

uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000d400

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.01:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.9rc2  (Thu Mar 24 10:33:39 2005 UTC).

ACPI: PCI Interrupt 0000:02:04.0[A] -> GSI 22 (level, low) -> IRQ 22

ALSA device list:

  #0: SB Live [Unknown] (rev.4, serial:0x211102) at 0xc400, irq 22

oprofile: using NMI interrupt.

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 64Kbytes

TCP established hash table entries: 131072 (order: 9, 2097152 bytes)

TCP bind hash table entries: 65536 (order: 7, 786432 bytes)

TCP: Hash tables configured (established 131072 bind 65536)

ip_conntrack version 2.1 (7168 buckets, 57344 max) - 220 bytes per conntrack

ip_tables: (C) 2000-2002 Netfilter core team

ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/

arp_tables: (C) 2002 David S. Miller

NET: Registered protocol family 1

NET: Registered protocol family 17

ACPI wakeup devices:

PCI0 HUB0 USB0 USB1 USB2 USB3 MODM UAR1

ACPI: (supports S0 S1 S4 S5)

ReiserFS: hda3: found reiserfs format "3.6" with standard journal

input: PS/2 Generic Mouse on isa0060/serio1

psmouse.c: Failed to enable mouse on isa0060/serio1

ReiserFS: hda3: using ordered data mode

ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda3: checking transaction log (hda3)

ReiserFS: hda3: Using r5 hash to sort names

VFS: Mounted root (reiserfs filesystem) readonly.

Freeing unused kernel memory: 216k freed

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1

ReiserFS: hda1: found reiserfs format "3.6" with standard journal

ReiserFS: hda1: using ordered data mode

ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda1: checking transaction log (hda1)

ReiserFS: hda1: Using r5 hash to sort names

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
```

FWIW, I get the same results when booting off of a Live CD that supports SMP.

the motherboard is an ABIT BH7 and the CPU is a Pentium4-2400 that supports hyperthreading.  I haven't found any suitable BIOS settings that can be used to enable SMP.

ideas???

TIA.

Bob

----------

## henryzhou

 *ajaygautam wrote:*   

> henry, is this still an issue, or did you find a solution ?

 

No, I haven't found a solution. But it seems doesn't affect the performance much.

----------

## bollucks

The problem is that you need to enable acpi for it to work now. acpi enumerates the hyperthread siblings.

----------

## carbonti

This was the same solution for me also - enabling ACPI options in the bios allowed the 2 Xeons installed in an Iwill DN-800 SLI board to show up in /proc/cpuinfo as 4 CPU's.

All the other switches for SMP and HT were checked Y in the kernel as expected.

----------

## Bob P

looking back at my previous post, i have hyperthreading support built into the kernel AND i have ACPI turned on in the BIOS and in the kernel -- but hyperthreading remains disabled.    :Confused: 

can anyone make sense of this?

----------

## TinheadNed

bob p:  All pentium 4's say they do hyperthreading (ht flag) - unfortunately it doesn't mean they actually do.  For example - ALL P4-celerons say they HT (including mine), but they don't.  I was confused for a while as the motherboard said it had detected HT, but as with a previous poster, it was just that the BIOS didn't recognise the board.

That "hypthreading disabled" line in your dmesg looks like there's nothing there to HT.

----------

## starrbuck

Same issue here.  Pentium 4 2.8c with ACPI disabled, HyperThreading enabled, SMP enabled, but only one CPU detected.  When I enabled ACPI in the kernel it detected the second CPU and compiled properly.

----------

## enlightend

 *henryzhou wrote:*   

>  *ajaygautam wrote:*   henry, is this still an issue, or did you find a solution ? 
> 
> No, I haven't found a solution. But it seems doesn't affect the performance much.

 

Yeah well, HT is just faking the presence of a 2nd CPU while all you got is still that one CPU core.

----------

## njcwotx

enabling ACPI did the trick for me.

Using gentoo live cd confirmed I had 2 LCPU's.

----------

