From owner-freebsd-questions@FreeBSD.ORG Wed Jan 12 11:15:45 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1EE216A4CE for ; Wed, 12 Jan 2005 11:15:45 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5A3843D46 for ; Wed, 12 Jan 2005 11:15:44 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])j0CBFghT021014 for ; Wed, 12 Jan 2005 13:15:43 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) j0CBFg9D017524 for ; Wed, 12 Jan 2005 13:15:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)j0CBFgvb017523 for freebsd-questions@FreeBSD.org; Wed, 12 Jan 2005 13:15:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 12 Jan 2005 13:15:42 +0200 From: Giorgos Keramidas To: freebsd-questions@FreeBSD.org Message-ID: <20050112111542.GA1651@orion.daedalusnetworks.priv> References: <9094-SnapperMsgD246FC56BE0A255B@68.243.126.247> <20050112014359.GA3722@gothmog.gr> <35de0c30050111210235ea3060@mail.gmail.com> <20050112052901.GA61033@osiris.chen.org.nz> <167683180.20050112072014@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <167683180.20050112072014@wanadoo.fr> Subject: Re: Hyperthreading hurts 5.3? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2005 11:15:45 -0000 On 2005-01-12 07:20, Anthony Atkielski 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@freebie.atkielski.com:/usr/obj/usr/src/sys/FREEBIE > ACPI APIC Table: > 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 > Hyperthreading: 2 logical CPUs > real memory = 1073414144 (1023 MB) > avail memory = 1045057536 (996 MB) > ioapic0: Changing APIC ID to 2 > ioapic0 irqs 0-23 on motherboard > npx0: [FAST] > npx0: on motherboard > npx0: INT 16 interface > acpi0: 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: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 > pcib1: at device 1.0 on pci0 > pcib1: could not get PCI interrupt routing table for \\_SB_.PCI0.P0P1 - AE_NOT_FOUND > pci1: on pcib1 > pci1: 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@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 % Hyperthreading: 2 logical CPUs % real memory = 468647936 (446 MB) % avail memory = 449392640 (428 MB) % npx0: [FAST] % npx0: on motherboard % npx0: INT 16 interface % acpi0: 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: on acpi0 % acpi_button0: on acpi0