Re: How much kernel stack do we need?

John G. Alvord (jalvo@cloud9.net)
Sat, 20 Jun 1998 22:14:47 GMT


On Sat, 20 Jun 1998 18:07:19 -0400 (EDT), Mathieu Bouchard
<boum01@UQAH.UQuebec.CA> wrote:

>> > 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.
>> Don't forget about nested ``slow'' interrupts and bottom half handlers.
>> I think we don't have enough stack to be able to deal with the worst
>> case.
>
>can't this size just be variable? like, auto-extend to 8K when necessary?
>if swapping issues are a problem, well, something like 1% of RAM or 256k
>whichever the smallest is (just change my constants that probably aren't
>very good) could be reserved in case of big problem. this could be tuned
>through /proc.
I have seen code that does this on another system. Linkage assist entry
(roughly 20 instructions on a non-extend path) and linkage assist exit
(roughly 10 instructions) was needed. That seems pretty excessive to add
to kernel overhead.

john alvord

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu