From owner-p4-projects Sat May 18 20:58:40 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D06D137B407; Sat, 18 May 2002 20:58:33 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from 12-234-96-171.client.attbi.com (12-234-96-171.client.attbi.com [12.234.96.171]) by hub.freebsd.org (Postfix) with ESMTP id C1F3437B40A; Sat, 18 May 2002 20:58:32 -0700 (PDT) Received: by 12-234-96-171.client.attbi.com (Postfix, from userid 1000) id 406E2A900; Sat, 18 May 2002 20:57:49 -0700 (PDT) Date: Sat, 18 May 2002 20:57:49 -0700 From: Jonathan Mini To: John Baldwin Cc: Jeff Roberson , Julian Elischer , Perforce Change Reviews , Peter Wemm , Jeff Roberson Subject: Re: PERFORCE change 11120 for review Message-ID: <20020518205749.G25907@stylus.haikugeek.com> References: <20020518233041.X49505-100000@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from jhb@FreeBSD.org on Sat, May 18, 2002 at 11:37:03PM -0400 Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Baldwin [jhb@FreeBSD.org] wrote : > On 19-May-2002 Jeff Roberson wrote: > > On Sat, 18 May 2002, John Baldwin wrote: > > > >> > >> Yes, having init() called w/o it would be good since I think init() is > >> the one that can actually block. For threads the init/fini setup > >> and teardown thread stacks and the actual operation to do a thread stack > >> teardown/setup can block so we need to not hold any locks when we do > >> that. > >> > > > > Why are we blocking in init? Is this a tsleep() block or short term lock > > block? It may add a few lock/unlock calls to uma but that should be ok > > since it's on a per slab basis. > > We are allocating a thread stack to attach to the thread structures (IIRC). > Jonathan would know the details better. That is correct. We must allocate a kernel stack for the thread as well as map the pages in and wire them down. The pages are unwired when the process is swapped, IIRC. > Perhaps we need a slightly different paradigm where we use a zone of > thread stacks the init and fini of thread structures use, but I'm not > sure. Such a solition had not occured to me. However, this only makes the problem more rare. The vm_object would still be created and mapped within a thread_init(), and freed in a thread_fini(). The only thing that would change is that we'd go through the UMA code again before it happens. -- Jonathan Mini http://www.haikugeek.com "He who is not aware of his ignorance will be only misled by his knowledge." -- Richard Whatley To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message