getaffinity/setaffinity and cpu sets.

David Schultz das at FreeBSD.ORG
Thu Feb 21 21:08:14 UTC 2008


I have no specific comments, but I wanted to point out that the
Solaris kernel team put a lot of thought into coming up with a
flexible processor binding API for Solaris 10 that meshes well
with jails (a.k.a. zones in Solaris). It might be worthwhile to
investigate what good ideas they might have had, and to decide if
compatibility is worthwhile:

    http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/pset.h

There are manpages for this stuff somewhere. pset_create and
pset_destroy obviously create and delete processor set definitions.
pset_bind binds a particular process / thread / session / jail
to a processor set, similar to your CPU_WHICH_* flags, I think,
but with more options.


More information about the freebsd-arch mailing list