From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 9 16:21:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41DB116A4CE for ; Wed, 9 Jun 2004 16:21:58 +0000 (GMT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15D4343D1D for ; Wed, 9 Jun 2004 16:21:58 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 20628 invoked from network); 9 Jun 2004 16:21:56 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 9 Jun 2004 16:21:55 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i59GLqsl018976; Wed, 9 Jun 2004 12:21:52 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Wed, 9 Jun 2004 12:22:43 -0400 User-Agent: KMail/1.6 References: <20040609115052.D24917@lycra.luckie.org.nz> <40C726EA.9060704@xwave.com> In-Reply-To: <40C726EA.9060704@xwave.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406091222.43436.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx Subject: Re: Hyperthreading question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 16:21:58 -0000 On Wednesday 09 June 2004 11:04 am, Dwayne MacKinnon wrote: > Hello, > > I'm in charge of upgrading a number of boxes from 4.8-RELEASE from > 4.10-RELEASE. My problem is this section of notes from the 4.9-RELEASE > errata: > > (28 Oct 2003) Very late in the release cycle, a change was made to the > HyperThreading (HTT) support on Intel=AE processors. HTT support is now > enabled by default on SMP-capable kernels; as a result, the HTT kernel > option is unnecessary and has been removed. The extra logical CPUs are > always started so that they can handle interrupts, but are prevented > from executing user processes by default. To enable the logical CPUs, > change the value of the machdep.hlt_logical_cpus sysctl(8) variable from > 1 to 0. This value can also be set from the loader as a tunable of the > same name. This behavior is now identical to FreeBSD 5.X. > > My boss is pretty adamant about not wanting the logical CPUs started at > all, let alone having them available for user processes. So, I'm > wondering if there's any straightforward way to disable them. Kernel > hacking is not a problem... we use custom kernels in our work anyway. > But I'd really appreciate a pointer in the right direction, as well as a > general idea of how difficult my life will get if I attempt this. > > (Note that I attempted to disable HT support in the BIOS. It didn't > have any effect. The logical CPUs still launched.) The CPUs are not used to schedule any user processes. Unfortunately, if yo= u=20 completely turn them off the box will lock up due to the way interrupts are= =20 fielded in FreeBSD 4.x. If you really don't want to use them, you can turn= =20 off the use of TPR (there's some #define in a header, LOPRIO something I=20 think), but it will send your performance into the toilet. =2D-=20 John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org