HEADS UP: new cpuset and scheduler topology code.

Jeff Roberson jroberson at chesapeake.net
Sun Mar 2 08:38:02 UTC 2008

Starting with ULE revision 1.226 support is available for cpusets and more 
advanced cpu topology.

As announced earlier, cpusets are a way to manage the cpus a thread or 
process is allowed to run on.  All processes in the system are assigned to 
a cpuset, by default set 1.  You may modify the cpus that participate in 
this set, create new sets, and move processes between sets.  Individual 
threads and processes may further refine the cpus they are allowed to run 
on with a per-thread mask that is a subset of the set the thread is 
assigned to.  A manpage is forthcoming, for now you may experiment with 
and try to decipher the incredibly cryptic 'cpuset' program I also 

The improved CPU topology code is aware of which cores share packages, 
caches, system bus/memory links, which are hyper-threaded, etc.  This 
allows the scheduler to more intelligently place threads by improving 
affinity information and by load balancing across these resources.

Many programs should run faster on dual and quadcore machines but there is 
still some tuning to do.  If you notice a workload is now significantly 
faster or slower please report it to me.


More information about the freebsd-current mailing list