Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 2003 19:55:29 -0400 (EDT)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        David Xu <davidxu@viatech.com.cn>
Cc:        threads@freebsd.org
Subject:   Re: Thread-related LOR in exit1() (fwd)
Message-ID:  <Pine.GSO.4.10.10304211952350.7276-100000@pcnet1.pcnet.com>
In-Reply-To: <Pine.GSO.4.10.10304211137450.20924-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Apr 2003, Daniel Eischen wrote:

> On Mon, 21 Apr 2003, David Xu wrote:
> > ----- Original Message ----- 
> > From: "Daniel Eischen" <eischen@pcnet1.pcnet.com>
> > To: <threads@freebsd.org>
> > Cc: <davidxu@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10304211952350.7276-100000>