Thread-related LOR in exit1() (fwd)

Daniel Eischen eischen at pcnet1.pcnet.com
Mon Apr 21 16:55:33 PDT 2003


On Mon, 21 Apr 2003, Daniel Eischen wrote:

> On Mon, 21 Apr 2003, David Xu wrote:
> > ----- Original Message ----- 
> > From: "Daniel Eischen" <eischen at pcnet1.pcnet.com>
> > To: <threads at freebsd.org>
> > Cc: <davidxu at freebsd.org>
> > Sent: Monday, April 21, 2003 10:33 PM
> > Subject: Thread-related LOR in exit1() (fwd)
> > 
> > 
> > > David, did you see this message sent to -current?
> > > 
> > I have committed a fix.
> > 
> > > Also, I have scope system threads running in a simple test.  I'm
> > > getting EPROCLIM though when trying to create more than 4 or so
> > > of them (KSEs with their own KSEG).
> > > 
> > 
> > Yeah,  sysctl -a |grep kern.threads
> > should show the reason,  please increase max_groups_per_proc sysctl by hand,
> > I know it's too small. :-)
> 
> Yeah, it should probably be whatever libthr uses for max
> threads (KSEs).  Perhaps minus the number of virtual CPUs
> (upcalls) allowed in the main KSEG.
> 
> > > Here's the patches to libpthread that I'm currently using along
> > > with a test program.
> > > 
> > >     http://people.freebsd.org/~deischen/kse/libpthread.diffs
> > >     http://people.freebsd.org/~deischen/kse/thread_test2.c
> > > 
> > I am going to sleep again,  I will test it tomorrow.
> > it seems KMF_NOCOMPLETED should be added in _kse_lock_wait().
> 
> That's all you do is sleep!  I'll look at using KMF_NOCOMPLETED
> in _kse_lock_wait().

Yep, your exactly right.  We need to prevent upcalls
while in _kse_lock_wait() during kse_release().  This
seems to fix any locklevel problems I was having.

-- 
Dan Eischen



More information about the freebsd-threads mailing list