Regarding core disable in FreeBSD 9

Florian Smeets flo at FreeBSD.org
Fri Apr 13 17:43:11 UTC 2012


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.

Florian


More information about the freebsd-hackers mailing list