Date: Fri, 17 Aug 2001 09:12:16 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: "Eugene L. Vorokov" <vel@bugz.infotecs.ru> Cc: freebsd-hackers@freebsd.org Subject: Re: kernel stack size Message-ID: <Pine.BSF.4.21.0108170907430.22899-100000@InterJet.elischer.org> In-Reply-To: <200108171344.f7HDife37351@bugz.infotecs.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
We may go to 2 pages but really 1 page is enough as long as people don't store structures on the stack. It's been kept small to keep the overhead of processes and threads down. When we get threads (KSE) we may have theoretically thousands more of these, on potentially smaller boxes.. The main poitn is that it's FIXED and that you can have recursion and interrupts so kernel programmers should know that a stack is a minimal resource. To some extent keeping it VERY small helps force this disciplin on people. As I said before there is a possibility we may go to 2 pages but that's not at all certain. On Fri, 17 Aug 2001, Eugene L. Vorokov wrote: > > In 5-0-KSE there is a single page that contains the stack and > > the PCB (which is about 660 bytes). We are also looking at adding > > code to set a hardware watchpoint between the stack and the PCB > > to catch overruns. > > Maybe I'm just dumb, but I still don't understand, what is the reason of > keeping kernel stack size so small ? I understand there should be no > need in huge stack, but why so damn small ? Would someone explain please ? > > Regards, > Eugene > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0108170907430.22899-100000>