Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2005 18:41:02 +0100
From:      Anthony Atkielski <atkielski.anthony@wanadoo.fr>
To:        freebsd-questions@freebsd.org
Subject:   Re: Hyperthreading hurts 5.3?
Message-ID:  <1869737534.20050112184102@wanadoo.fr>
In-Reply-To: <20050112111542.GA1651@orion.daedalusnetworks.priv>
References:  <9094-SnapperMsgD246FC56BE0A255B@68.243.126.247> <20050112014359.GA3722@gothmog.gr> <B8CC38DE-6455-11D9-87A5-000D93AD26C8@tntluoma.com> <35de0c30050111210235ea3060@mail.gmail.com> <20050112052901.GA61033@osiris.chen.org.nz> <167683180.20050112072014@wanadoo.fr> <20050112111542.GA1651@orion.daedalusnetworks.priv>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas writes:

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

I found it, in a file called SMP.  Why is the SMP option tucked away in
a separate file?

I stuck this into the config and rebuilt the kernel. Seems to run fine.
I see that top has a C column now, and running a program in a continuous
loop takes up exactly 50% of the machine (and two such programs take up
exactly 100%), according to top.

Boot messages looked a bit different:

The Regents of the University of California. All rights reserved.
FreeBSD 5.3-RELEASE #0: Wed Jan 12 17:55:18 CET 2005                                                                                                                                                                                                                                                               
root@freebie.atkielski.com:/usr/obj/usr/src/sys/FREEBIE-SMP                                                                                                                                                                                                                                                        
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 = 1045061632 (996 MB)                                                                                                                                                                                                                                                                                 
ACPI APIC Table: <A M I  OEMAPIC >                                                                                                                                                                                                                                                                                 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs                                                                                                                                                                                                                                                                
cpu0 (BSP): APIC ID:  0                                                                                                                                                                                                                                                                                            
cpu1 (AP): APIC ID:  1                                                                                                                                                                                                                                                                                             
[...]
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0 
[...]
SMP: AP CPU #1 Launched!

So I guess it's all working now.  That was easy.

I imagine this will give me a bit more horsepower for the buck,
although--with only 0.2% of the machine busy under normal load even with
a single processor--I guess I wasn't exactly processor-bound to begin
with (I'd run out of I/O capacity long before running out of processor).
But why not profit from what's there, eh?

-- 
Anthony




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1869737534.20050112184102>