> > for example, aic7xxx_isr() has a real stack usage of 53 bytes,
>
> There aren't only the variables at the start of the function. Look a bit
> further down, somewhere in a local block they allocate a huge array. [...]
coolness, that one line in the 1000+ lines function missed me ;). 10x more
stack usage was really scary. But i remember Leonard Zubkoff complained
about another function too (in the mid-SCSI layer), which didnt have
anything stupid in it, still had a large stack ... i could be wrong.
> BTW, it occurred to me that compiling the kernel with -finline-functions _may_
> increase the probability of kernel stack overflows - say you have a function
> which may get called recursively, and which (rarely) calls another small
> function that uses lots of stack. If GCC were to inline the small function,
> you'd have a much higher stack usage in the normal case.
maybe a 'make stackcheck' option in the main Makefile could help
identifying too big stacks [done by the user]. We cannot check in one go
unfortunately, unless you know a way to recompile everything correctly.
-- mingo