From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 03:23:59 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7282F1065670; Sun, 7 Dec 2008 03:23:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2F58E8FC08; Sun, 7 Dec 2008 03:23:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mB73NaAq039841; Sat, 6 Dec 2008 20:23:36 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 06 Dec 2008 20:23:44 -0700 (MST) Message-Id: <20081206.202344.-160243400.imp@bsdimp.com> To: kostikbel@gmail.com From: "M. Warner Losh" In-Reply-To: <20081205230002.GX2038@deviant.kiev.zoral.com.ua> References: <200812052050.mB5KoOcV072648@svn.freebsd.org> <20081205224600.GA16948@freebsd.org> <20081205230002.GX2038@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, rdivacky@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r185647 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 03:23:59 -0000 In message: <20081205230002.GX2038@deviant.kiev.zoral.com.ua> Kostik Belousov writes: : On Fri, Dec 05, 2008 at 11:46:00PM +0100, Roman Divacky wrote: : > 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? : : I do not think that there is any measurable difference. On the other : hand, the patch makes struct proc bigger by int + pointer. This shall : not be a problem too. : : Would I been able to convert _all_ uses of the struct proc * wait channel : to cond vars operation, this may be measurable on some loads, since it : would exclude spurious wakeups. Is that a measurable good difference, or a measurable bad difference? Warner