From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 13 18:03:22 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAD9B1065670; Fri, 13 Apr 2012 18:03:22 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (firebox.emsphone.com [199.67.51.15]) by mx1.freebsd.org (Postfix) with ESMTP id 6F0198FC16; Fri, 13 Apr 2012 18:03:22 +0000 (UTC) Received: from dan.emsphone.com ([199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id q3DI3Kv5099343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Apr 2012 13:03:20 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id q3DI3JVS027191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Apr 2012 13:03:20 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id q3DI3J9d027187; Fri, 13 Apr 2012 13:03:19 -0500 (CDT) (envelope-from dan) Date: Fri, 13 Apr 2012 13:03:19 -0500 From: Dan Nelson To: Florian Smeets Message-ID: <20120413180318.GA61234@dan.emsphone.com> References: <1334333913.65753.YahooMailNeo@web193204.mail.sg3.yahoo.com> <20120413173440.GA48030@freebsd.org> <4F8865AB.10504@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F8865AB.10504@FreeBSD.org> X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.2 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [172.17.19.78]); Fri, 13 Apr 2012 13:03:20 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 172.17.19.78 Cc: Alexander Best , Mahesh Babu , "freebsd-hackers@freebsd.org" Subject: Re: Regarding core disable in FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2012 18:03:22 -0000 In the last episode (Apr 13), Florian Smeets said: > On 13.04.12 19:34, Alexander Best wrote: > > On Sat Apr 14 12, Mahesh Babu wrote: > >> How to disable a particular core in FreeBSD 9? How to enable it again? > > > > i don't think it's possible to do that in freebsd. what you can do is to > > disable SMP oder hyperthreading. alternatively you can assign a certain > > process to a certain core. > > > > i think there's a project to disable and enable specific cores on the > > fly. freebsd is pretty far behind regarding this feature. beos was > > able to do this anno 1998 or so afair. > > You can set the following in /boot/loader.conf > > hint.lapic.128.disabled=1 > hint.lapic.130.disabled=1 > > Where 128 and 130 are IDs of cores you want to disable, you can find the > IDs for your CPUs/cores in > > dmesg or /var/log/messages e.g. > > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 2 > cpu2 (AP): APIC ID: 4 > cpu3 (AP): APIC ID: 16 > > Enabling and disabling on the fly is not possible. You can't completely disable a core, but you can tell the scheduler not to use it, via the cpuset command. For example, "cpuset -s 1 -l 0,1" will change the mask for cpuset 1 (the default set) to only allow cpus 0 and 1. -- Dan Nelson dnelson@allantgroup.com