Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 2008 23:46:00 +0100
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Konstantin Belousov <kib@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r185647 - in head/sys: kern sys
Message-ID:  <20081205224600.GA16948@freebsd.org>
In-Reply-To: <200812052050.mB5KoOcV072648@svn.freebsd.org>
References:  <200812052050.mB5KoOcV072648@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081205224600.GA16948>