svn commit: r230984 - head/sys/kern

John Baldwin jhb at freebsd.org
Mon Feb 6 15:21:59 UTC 2012


On Monday, February 06, 2012 6:34:06 am Ivan Voras wrote:
> On 4 February 2012 17:49, Ryan Stone <rstone at freebsd.org> wrote:
> > Author: rstone
> > Date: Sat Feb  4 16:49:29 2012
> > New Revision: 230984
> > URL: http://svn.freebsd.org/changeset/base/230984
> >
> > Log:
> >  Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
> >  set on the new thread.  This prevents the thread from inadvertently
> >  inheriting affinity from a random sibling.
> 
> Shouldn't new threads inherit affinity from the threads which spawned them?

User threads still do, but kernel threads are a bit tricky since most of them
get created during boot when everything is running on the BSP, so the affinity
they would inherit is rather bogus.  Even post-boot many of the cases I can
think of when you would create kthreads (e.g. expanding a thread pool), you
don't really want to inherit affinity.

-- 
John Baldwin


More information about the svn-src-all mailing list