lkml.org 
[lkml]   [1998]   [Jun]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How much kernel stack do we need?
DateSat, 20 Jun 1998 07:24:05 +0200 (MET DST)
From(Rogier Wolff)
Stefan Traby wrote:
> 
> Hi John !
> 
> > You could experiment by initializing the stack such that only a portion
> > was used. For example, allocate 4K, allocate kernel stuff, and then set
> > the pointers such that only 1K is available for use. That would expose
> > the memory hogs quickly. That is a pure debug case, of coruse.
> 
> This is IMHO an extreme bad idea. The solution without crashing:
> init:    alloc stack, fill with a magic (ex.: 0xdeadbeef)
> destroy: scan for magic on stack to calculate stackspace

You could do that, however, the maximum stack depth is not known, and
will only get activated in extremely unusual circumstances. 

E.g. that a select call causes disk I/O on a SCSI device, that hits an
error. (Select doesn't do I/O, so it must be a page fault doing the
I/O. Anybody willing to use a disk bad sectors on the swap to test
this?)

Anyway, you don't want to set the limit such that a system crashes
when it DOES hit an IO error in extreme conditions

					Roger. 

-- 
Actor asks a collegue: "To what do you owe your success in acting?"
Answer: "Honesty. Once you've learned how to fake that, you've got it made."
-------- Custom Linux device drivers for sale! Call for a quote. ----------
Email: R.E.Wolff@BitWizard.nl || Tel: +31-15-2137555 || FAX: +31-15-2138217
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 12:43    [W:1.913 / U:0.030 seconds]
©2003-2008 Jasper Spaans