Re: [2.6 patch] i386: always use 4k stacks

From: Adrian Bunk
Date: Tue Dec 20 2005 - 07:57:43 EST


On Mon, Dec 19, 2005 at 02:10:17PM -0500, Parag Warudkar wrote:
>...
> How do you determine how much stack space a piece of code is going to
> need without knowing what functionality it needs to build? There
> might be deeply nested, long call chains etc. which certain types of
> functionality might warrant.

Static analysis of this problem is possible.

"make checkstack" is a good starting point.

And the automatic analysis of all possible call chains can and has
already found problems.

> How do you prove "4K otta be enough
> stack for everyone doing everything", on what basis? (Reminds me of
> old DOS days and the famous statement relating to 640K)
>...

We are talking about reducing the stack size by one third which doesn't
result in a fundamental difference.

There is no technical reason why 4 kB shouldn't be enough - I don't
count sloppy coding as a reason for it since in such cases we better
correct the code.

> Parag

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
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/