From owner-freebsd-hackers Tue Aug 7 13: 1: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id D5DE037B40C; Tue, 7 Aug 2001 13:00:59 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA71598; Tue, 7 Aug 2001 15:07:46 -0700 (PDT) Date: Tue, 7 Aug 2001 15:07:45 -0700 (PDT) From: Julian Elischer To: Weiguang SHI Cc: semenu@FreeBSD.org, freebsd-hackers@FreeBSD.org Subject: Re: Kernel stack size In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG yes you could do that but N is still goin gto be small when compared to teh size of a userland stack, and all upages come out of a KVM object which is limitted. When we get threads, we have to be able to have a hundred stacks per process if things get silly. Actually in teh KSE kernel I'm working on UPAGES is defined as (UAREA_PAGES+KSTATCK_PAGES) so increasing KSTACK_PAGES (presently 1) is what you would want to do.. it's still bad practice (particularly on 4.x) to put a lot of stuff on the kernel stack. Also, remember that if you are writing a device driver, the interrupt half of your driver will not always run on the same stack as the top half, so things that are passed between them can't be stored there.. (not to mention if the process gets swapped out) On Tue, 7 Aug 2001, Weiguang SHI wrote: > > > > >From: Julian Elischer > >To: "Semen A. Ustimenko" > >CC: freebsd-hackers@FreeBSD.org > >Subject: Re: Kernel stack size > >Date: Tue, 7 Aug 2001 13:29:25 -0700 (PDT) > > > > > > > >On Wed, 8 Aug 2001, Semen A. Ustimenko wrote: > > > > > Hi! Thanks for light speed response! > > > > > > On Tue, 7 Aug 2001, Julian Elischer wrote: > > > > > > > the kernel stack is a VERY LIMITED resource > > > > basically you have about 4 or 5 Kbytes per process. > > > Oops... And there is no hope to enlarge it? > > > >none really. > >that's the way it is in all kernels.. > >The kernel is a very limited environment. > > How about just changing UPAGES to n (n>2)? > > Weiguang > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message