threads/89262: [kernel] [patch] multi-threaded process hangs in kernel in fork()

John Baldwin jhb at freebsd.org
Tue Feb 14 11:10:08 PST 2006


The following reply was made to PR threads/89262; it has been noted by GNATS.

From: John Baldwin <jhb at freebsd.org>
To: David Xu <davidxu at freebsd.org>
Cc: bug-followup at freebsd.org, garry at 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 <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the freebsd-threads mailing list