Date: Mon, 24 Jan 2005 19:24:04 -0500 (EST) From: Daniel Eischen <deischen@freebsd.org> To: Joe Marcus Clarke <marcus@freebsd.org> Cc: Julian Elischer <julian@elischer.org> Subject: Re: [PATCH] Dynamic thread stack size Message-ID: <Pine.GSO.4.43.0501241914500.19951-100000@sea.ntplx.net> In-Reply-To: <1106611680.28710.48.camel@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Jan 2005, Joe Marcus Clarke wrote: > On Mon, 2005-01-24 at 15:15 -0800, Julian Elischer wrote: > > > > >> > > > > > >Okay, so lobby that it gets reduced in login.conf. Why should threads > > >be given less stack than processes, especially the initial thread? > > > > > > > because there may be 50 of them? (or maybe even 500?) > > > > Threaded programs are supposed to be aware that stack is a limited resource. > > I thought about that, but I also thought that KSEs were treated > similarly to processes so it wouldn't matter if each one had a full > allocation of stacksize? KSE != thread A (userland) KSE stack is very small and is just enough to schedule threads. A thread stack is allocated (by default) off the one (and only one) process' stack. Allocating lots of threads with large stacks depletes the process stack. -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0501241914500.19951-100000>