svn commit: r185647 - in head/sys: kern sys
Roman Divacky
rdivacky at FreeBSD.org
Fri Dec 5 14:50:41 PST 2008
On Fri, Dec 05, 2008 at 08:50:24PM +0000, Konstantin Belousov wrote:
> Author: kib
> Date: Fri Dec 5 20:50:24 2008
> New Revision: 185647
> URL: http://svn.freebsd.org/changeset/base/185647
>
> Log:
> Several threads in a process may do vfork() simultaneously. Then, all
> parent threads sleep on the parent' struct proc until corresponding
> child releases the vmspace. Each sleep is interlocked with proc mutex of
> the child, that triggers assertion in the sleepq_add(). The assertion
> requires that at any time, all simultaneous sleepers for the channel use
> the same interlock.
>
> Silent the assertion by using conditional variable allocated in the
> child. Broadcast the variable event on exec() and exit().
>
> Since struct proc * sleep wait channel is overloaded for several
> unrelated events, I was unable to remove wakeups from the places where
> cv_broadcast() is added, except exec().
are there any differences (performance etc.) in using condition variables
instead of sleep/wakeup?
More information about the svn-src-head
mailing list