From owner-svn-src-head@FreeBSD.ORG Fri Dec 5 22:50:41 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87B981065673; Fri, 5 Dec 2008 22:50:41 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5948FC0C; Fri, 5 Dec 2008 22:50:40 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id EBE139CB344; Fri, 5 Dec 2008 23:46:02 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3frPamQQhKUV; Fri, 5 Dec 2008 23:46:00 +0100 (CET) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id BE8A29CB5AB; Fri, 5 Dec 2008 23:46:00 +0100 (CET) Received: (from rdivacky@localhost) by lev.vlakno.cz (8.14.2/8.14.2/Submit) id mB5Mk0ut017429; Fri, 5 Dec 2008 23:46:00 +0100 (CET) (envelope-from rdivacky) Date: Fri, 5 Dec 2008 23:46:00 +0100 From: Roman Divacky To: Konstantin Belousov Message-ID: <20081205224600.GA16948@freebsd.org> References: <200812052050.mB5KoOcV072648@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812052050.mB5KoOcV072648@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 22:50:41 -0000 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?