From owner-freebsd-current Mon Apr 3 7:46:28 2000 Delivered-To: freebsd-current@freebsd.org Received: from popserver-02.iinet.net.au (popserver-02.iinet.net.au [203.59.24.148]) by hub.freebsd.org (Postfix) with ESMTP id 0C17237BE1A for ; Mon, 3 Apr 2000 07:46:19 -0700 (PDT) (envelope-from julian@elischer.org) Received: from jules.elischer.org (reggae-02-160.nv.iinet.net.au [203.59.91.160]) by popserver-02.iinet.net.au (8.9.3/8.9.3) with SMTP id WAA26802; Mon, 3 Apr 2000 22:44:35 +0800 Message-ID: <38E8ADEC.794BDF32@elischer.org> Date: Mon, 03 Apr 2000 07:42:52 -0700 From: Julian Elischer X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 5.0-CURRENT i386) MIME-Version: 1.0 To: hm@hcs.de Cc: Poul-Henning Kamp , garyj@muc.de, bright@wintelcom.net, freebsd-current@FreeBSD.ORG Subject: Re: MLEN and crashes References: <20000403131757.4F48238FA@hcswork.hcs.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hellmuth Michaelis wrote: > > >From the keyboard of Poul-Henning Kamp: > > > We need to be frugal about the kernel stack, for a lot of reasons, > > that's just the way it is, and as far as I know it is the way > > it will continue to be. > > Good. I'd like to learn something from it: Shall i avoid allocating > structs on the kernel stack at all or is it just bad to allocate > big structs ? If the latter is true, what number is big > The best rule is never allocate anything bigger than a few elements. One reason to not allocate struct on the stack is that under some OS's (e.g. originally freebsd too) the stack could have been 'unmapped' while the that process was not in core, tus access toteh struct by an interrupt routine or something could be 'bad'. In FreeBSD this is presently not the case but.. Also, when we switch to ASYNC IO as a normal means of operation, the stack may sometimes be rewound before the IO is completed, which might also be considered "not a good thing" (TM). > -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Perth v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message