Hyperthreading hurts 5.3?

Giorgos Keramidas keramida at ceid.upatras.gr
Wed Jan 12 03:15:45 PST 2005


On 2005-01-12 07:20, Anthony Atkielski <atkielski.anthony at wanadoo.fr> wrote:
> Jonathan Chen writes:
> JC> Not true on 5.3+ GENERIC systems. If you look at dmesg, you'll see the
> JC> second virtual CPU launched as well as the extra column in top(1) if
> JC> you enable HTT in the BIOS.
>
> Well, now I'm confusing.  I have an Asus P4P800-E Deluxe MB with an
> Intel P4 processor mounted on it, and dmesg looks like this:
>
> FreeBSD 5.3-RELEASE #1: Mon Dec 27 05:52:34 CET 2004
>     root at freebie.atkielski.com:/usr/obj/usr/src/sys/FREEBIE
> ACPI APIC Table: <A M I  OEMAPIC >
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2998.57-MHz 686-class CPU)
>   Origin = "GenuineIntel"  Id = 0xf34  Stepping = 4
>   Features=0xbfebfbff<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,HTT,TM,PBE>
>   Hyperthreading: 2 logical CPUs
> real memory  = 1073414144 (1023 MB)
> avail memory = 1045057536 (996 MB)
> ioapic0: Changing APIC ID to 2
> ioapic0 <Version 2.0> irqs 0-23 on motherboard
> npx0: [FAST]
> npx0: <math processor> on motherboard
> npx0: INT 16 interface
> acpi0: <A M I OEMRSDT> on motherboard
> acpi0: Power Button (fixed)
> Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
> cpu0: <ACPI CPU> on acpi0
> pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> pci0: <ACPI PCI bus> on pcib0
> agp0: <Intel 82865 host to AGP bridge> mem 0xf8000000-0xfbffffff at device 0.0 on pci0
> pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
> pcib1: could not get PCI interrupt routing table for \\_SB_.PCI0.P0P1 - AE_NOT_FOUND
> pci1: <ACPI PCI bus> on pcib1
> pci1: <display, VGA> at device 0.0 (no driver attached)
> [...]
>
> Do I have two processors or not?  The BIOS says that hyperthreading is
> enabled (and it wouldn't say anything at all if the processor were not
> HT-capable, according to the manual).
>
> Where's the second logical processor?  I recompiled my own kernel but I
> didn't modify any of the CPU stuff (I don't think).

You need to enable SMP too, to allow the FreeBSD kernel to use the
second (hyper-threaded) CPU.

My workstation is a P4 @ 2800, which does support HTT, but I haven't
enabled SMP in my kernel configuration, so it is not used:

% # grep 'options[[:space:]]*SMP' /usr/src/sys/conf/NOTES
% options         SMP                     # Symmetric MultiProcessor Kernel
% # grep 'options[[:space:]]*SMP' \
%   /usr/src/sys/`uname -m`/conf/`uname -v | sed -e 's:.*/::' `
% # dmesg
% Copyright (c) 1992-2005 The FreeBSD Project.
% Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
%         The Regents of the University of California. All rights reserved.
% FreeBSD 6.0-CURRENT #0: Tue Jan 11 17:03:06 EET 2005
%     root at orion.daedalusnetworks.priv:/usr/obj/usr/src/sys/ORION
% WARNING: WITNESS option enabled, expect reduced performance.
% Timecounter "i8254" frequency 1193182 Hz quality 0
% CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2806.37-MHz 686-class CPU)
%   Origin = "GenuineIntel"  Id = 0xf33  Stepping = 3
%   Features=0xbfebfbff<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,HTT,TM,PBE>
%   Hyperthreading: 2 logical CPUs
% real memory  = 468647936 (446 MB)
% avail memory = 449392640 (428 MB)
% npx0: [FAST]
% npx0: <math processor> on motherboard
% npx0: INT 16 interface
% acpi0: <RS300 AWRDACPI> on motherboard
% acpi0: Power Button (fixed)
% Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
% acpi_timer0: <32-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
% cpu0: <ACPI CPU> on acpi0
% acpi_button0: <Power Button> on acpi0


More information about the freebsd-questions mailing list