From owner-freebsd-arch Thu Dec 20 14: 8:13 2001 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id E16A637B416; Thu, 20 Dec 2001 14:08:09 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id fBKM6Gl03956; Thu, 20 Dec 2001 23:06:17 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: John Baldwin Cc: Julian Elischer , arch@FreeBSD.org, Alfred Perlstein Subject: Re: Kernel stack size and stacking: do we have a problem ? In-Reply-To: Your message of "Thu, 20 Dec 2001 13:56:57 PST." Date: Thu, 20 Dec 2001 23:06:16 +0100 Message-ID: <3954.1008885976@critter.freebsd.dk> From: Poul-Henning Kamp 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 In message , John Baldwin writes: >Interrupts answer requests from the top half, they don't initiate requests on >their own AFAIK. If an interrupt needs to initiate a request that it wants >return state on, that's a bug I think. Ahh, I see a misunderstanding here: in VOP_ you have return state because the calls are synchronous, but netgraph and Geom are both asynchronous by design. The fact that VOP_ is synchrnous is also what makes it so hard to fix, and why I was kind of hoping for people to say "Don't worry about kernel stack, RAM is dirt cheap!" :-) Anyway, I guess the conclusion on this thread will be: A) We should probably implement int enough_stack() and apply it in some strategic places so we can fail gracely rather than panic when we run out of kernel stack. B) We have no idea how to sanely fix VOP_ since it is synchronous. When I say "sanely" I'm referring to the fact that the VOP code is scary enough as it is and we don't want to make it even hairier, lest we loose the few filesystem hackers we have, not to mention the fact that we would probably never complete the conversion in the first place (see sys/vnode.h::IS_LOCKING_VFS() for precedent.) C) Variant size kernel stacks are probably not worth the bother, but sysctl variable kernel stacks might be a good investment. C) Netgraph and Geom will use scheduling, possibly with a direct call optimization to avoid the issue. Julian hybrid scheme could possibly be adapted to Geom, if it can be made to maintain ordering (think: softupdates). Thanks for your input gentlemen. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message