From owner-freebsd-arch Thu Dec 20 11:55:48 2001 Delivered-To: freebsd-arch@freebsd.org Received: from root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id 33A1437B417; Thu, 20 Dec 2001 11:55:41 -0800 (PST) Received: (from dg@localhost) by root.com (8.11.2/8.11.2) id fBKJkR415988; Thu, 20 Dec 2001 11:46:27 -0800 (PST) (envelope-from dg) Date: Thu, 20 Dec 2001 11:46:27 -0800 From: David Greenman To: Julian Elischer Cc: Poul-Henning Kamp , arch@freebsd.org Subject: Re: Kernel stack size and stacking: do we have a problem ? Message-ID: <20011220114627.C15588@nexus.root.com> References: <600.1008837822@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from julian@elischer.org on Thu, Dec 20, 2001 at 11:04:59AM -0800 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> 3. Would it be possible to make kernel stack size a sysctl ? > >hmmm, it might but it would be tricky because the constant KSTACK_PAGES >is used for both allocation and deallocation so if you just changed it to >be a variable, and changed it in between...... >This is about to change BTW in KSE as there is a kstack per thread >and the allocation routines will be different. >The problem is that I'm caching threads and their stacks for quick >reallocation so I'd have to check each stack as I pass it out and check >whether I need to resize it to match the new size.. I'd like to point out that having stacks of different sizes is going to cause VM fragmentation problems if VM space for the system maximum size isn't preallocated for everything, and "growing" a stack could be very difficult or impossible if VM space hasn't already been preallocated (since it would have to be copied and fixed up). -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org President, TeraSolutions, Inc. - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message