From owner-freebsd-threads@FreeBSD.ORG Mon Apr 21 16:55:32 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D925537B401 for ; Mon, 21 Apr 2003 16:55:32 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30C8C43FDF for ; Mon, 21 Apr 2003 16:55:32 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h3LNtVBg007785; Mon, 21 Apr 2003 19:55:31 -0400 (EDT) Received: from localhost (eischen@localhost)h3LNtToK007777; Mon, 21 Apr 2003 19:55:31 -0400 (EDT) Date: Mon, 21 Apr 2003 19:55:29 -0400 (EDT) From: Daniel Eischen To: David Xu In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: Thread-related LOR in exit1() (fwd) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2003 23:55:33 -0000 On Mon, 21 Apr 2003, Daniel Eischen wrote: > On Mon, 21 Apr 2003, David Xu wrote: > > ----- Original Message ----- > > From: "Daniel Eischen" > > To: > > Cc: > > 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