From owner-freebsd-threads@FreeBSD.ORG Tue Feb 14 19:10:08 2006 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50B5916A420 for ; Tue, 14 Feb 2006 19:10:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CF0143D46 for ; Tue, 14 Feb 2006 19:10:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1EJA7LM012818 for ; Tue, 14 Feb 2006 19:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1EJA7Gt012817; Tue, 14 Feb 2006 19:10:07 GMT (envelope-from gnats) Date: Tue, 14 Feb 2006 19:10:07 GMT Message-Id: <200602141910.k1EJA7Gt012817@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: John Baldwin Cc: Subject: Re: threads/89262: [kernel] [patch] multi-threaded process hangs in kernel in fork() X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 19:10:08 -0000 The following reply was made to PR threads/89262; it has been noted by GNATS. From: John Baldwin To: David Xu Cc: bug-followup@freebsd.org, garry@networkphysics.com Subject: Re: threads/89262: [kernel] [patch] multi-threaded process hangs in kernel in fork() Date: Tue, 14 Feb 2006 14:00:11 -0500 On Monday 13 February 2006 23:51, David Xu wrote: > John Baldwin wrote: > > Only thing I would prefer is that you keep sleepq_catch_signals() but > > make it an internal function that sleepq_waitsig() and > > sleepq_timed_waitsig() call before sleepq_switch() so that > > sleepq_switch() doesn't get so long. Also, it would be good. Also, in > > sleepq_switch() you are using sleepq_release() and sleepq_lock() even > > though you already have a sleepqueue_chain pointer, and you do mtx > > operations on sc->sc_lock explicitly in some other places. It would be > > best to consistently just do mutex ops on sc->sc_lock instead of redoing > > the hash-lookup several times. > > patch updated: > http://people.freebsd.org/~davidxu/patch/slpq_susp5.patch Looks pretty good to me. I think it's actually a little cleaner now in that callers of sleepq_switch() have to lock sched_lock. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org