Re: [2.6 patch] i386: always use 4k stacks
From: Andi Kleen
Date: Wed Nov 16 2005 - 07:57:25 EST
Arjan van de Ven <arjan@xxxxxxxxxxxxx> writes:
> > I would like to contribute that listing with two non-technical reasons
> > more:
> >
> > * Encourages good code. Due to the 4 Kb stacks patch several parts of
> > the kernel have gone on diet, improving the quality of the code
>
> this argument I agree with. especially since 64 bit platforms have a
> higher stack footprint by nature (bigger call frames and more to store
> on the stack) and if x86 allows stackbloat, the other architectures get
> in trouble and are going to need really large stacks.
I think it's in general risky. It's like balancing without a safety
net. Might be a nice hobby, but for real production you want a safety
net. That's simple because there are likely some code paths through
the code that need more stack space and that are rarely hit (and
cannot be easily found by static analysis, e.g. if they involve
indirect pointers or particularly complex configuration setups). With
very tight stack space you're much nearer a crash in extreme
situations than otherwise.
So I think it's a bad idea to change this.
-Andi (who prefers to have safety nets)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/