From owner-freebsd-questions@FreeBSD.ORG Wed Sep 21 00:00:28 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63EC5106564A for ; Wed, 21 Sep 2011 00:00:28 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6CB298FC12 for ; Wed, 21 Sep 2011 00:00:21 +0000 (UTC) Received: by eyg7 with SMTP id 7so775870eyg.13 for ; Tue, 20 Sep 2011 17:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=KfMpPBlOgdYZ154xE9IuyMVk4oEIFsyyKP4+uH4vVaQ=; b=U3DGUpadvdXBsLLbXE3cBO7w3mMedSfMONIlwYBmM/ngFFZ/Up3uAUlskLeqYkTKGE VgDTFby2npUA/ZYvnS7OPoDAyfIU6THG6cDaeVff3O6I31aXBFFXg3TSUs5xNUUDHHDQ AHAelpwb/r77QPC4URBr0JdzYPcQoO5HyNecg= Received: by 10.216.230.139 with SMTP id j11mr1580519weq.87.1316563220201; Tue, 20 Sep 2011 17:00:20 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id r27sm4605111wbn.10.2011.09.20.17.00.17 (version=SSLv3 cipher=OTHER); Tue, 20 Sep 2011 17:00:19 -0700 (PDT) Date: Wed, 21 Sep 2011 01:00:15 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20110921010015.22e2586a@gumby.homeunix.com> In-Reply-To: <4E790572.10602@blueapex.co.uk> References: <1316550882.13474.YahooMailClassic@web121217.mail.ne1.yahoo.com> <4E790572.10602@blueapex.co.uk> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: How can I disable hyperthreads, but NOT smp ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2011 00:00:28 -0000 On Tue, 20 Sep 2011 22:28:18 +0100 Richard Collyer wrote: > On 20/09/2011 21:34, Jason Usher wrote: > > FreeBSD 6.4-RELEASE system with two physical CPUs, each of which > > are HT capable. From dmesg: > > > > cpu0 (BSP): APIC ID: 0 > > cpu1 (AP): APIC ID: 1 > > cpu2 (AP): APIC ID: 6 > > cpu3 (AP): APIC ID: 7 > > > > I also see this: > > > > machdep.hyperthreading_allowed: 0 > > How can I disable HT completely, but still retain ALL the benefits > > of SMP ? > > > > Thanks. > > It's usually a setting in the BIOS to disable Hyperthreading then > reconfigure the kernel to only use 2 cores (which it might do > automatically). > > Hyperthreading is outside the world of FreeBSD. As far as it knows > there is still 4 "logical processors". It's not completely outside; an OS should still be able to determine which logical CPUs are on the same core. And, presumably machdep.hyperthreading_allowed=0 tells the scheduler not to use the additional logical CPUs. I'm wondering if hyperthreading is unused, but the full set of logical CPU is still displayed, or perhaps 6.4 is failing to recognise the hardware.