From owner-freebsd-hackers Fri Aug 17 10:47:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 0D13837B406 for ; Fri, 17 Aug 2001 10:47:27 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f7HHlPq22042; Fri, 17 Aug 2001 11:47:25 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f7HHlOW43633; Fri, 17 Aug 2001 11:47:24 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200108171747.f7HHlOW43633@harmony.village.org> To: Julian Elischer Subject: Re: kernel stack size Cc: "Eugene L. Vorokov" , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 17 Aug 2001 09:12:16 PDT." References: Date: Fri, 17 Aug 2001 11:47:24 -0600 From: Warner Losh 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 In message Julian Elischer writes: : 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.. One interesting note is that if you call PCI BIOS, you have to guarantee you have at least 1k available to do so. I think that the current instances of the code comply, but if the stack size gets a lot smaller, I'm less sure. : 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. Some forced discipline may not be possible when dealing with external interfaces. I do not know if other platforms (open firmware) have similar requirements or not. Since I have my fingers in the PCI BIOS code at the moment and reading the PCI BIOS docs, I thought I'd mention it. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message