Date: Fri, 13 Apr 2012 13:03:19 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Florian Smeets <flo@freebsd.org> Cc: Alexander Best <arundel@freebsd.org>, Mahesh Babu <maheshbabu90@yahoo.co.in>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: Regarding core disable in FreeBSD 9 Message-ID: <20120413180318.GA61234@dan.emsphone.com> In-Reply-To: <4F8865AB.10504@FreeBSD.org> References: <1334333913.65753.YahooMailNeo@web193204.mail.sg3.yahoo.com> <20120413173440.GA48030@freebsd.org> <4F8865AB.10504@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120413180318.GA61234>