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

Adrian Bunk
2005-12-18T12:08:59Z

On Sun, Dec 18, 2005 at 12:03:39AM -0500, Parag Warudkar wrote:
>
> On Dec 17, 2005, at 3:52 PM, Adrian Bunk wrote:
>
> >And in my experience, many stack problems don't come from code getting
> >more complex but from people allocating 1kB structs or arrays of
>
> And we catch this type of problems fairly easily in the patch review
> itself, even before accepting the code in mainline. Plus there is
> make checkstack to help find and fix any such issues, isn't it? So
> it's not like forcing the stack to 4Kb and making the offending code
> to crash is the best solution to force people to write code which
> plays nice with the stack.

4kB stacks are already an option for some time. There were some problems
in the beginning, but as far as we know we have have fixed all of them.

There are so many possible bugs people writing kernel code could
introduce bugs that cause crashes. The solution is not to add
workarounds for programming bugs at every possible place, but as the
code review and "make checkstack" before accepting code.

As a data point, my count of bug reports for problems with in-kernel
code with 4k stacks after Neil's patch went into -mm is still at 0.

> I think on i386 most people do fine with the 8Kb stack - whoever
> benefits from 4Kb stack, can always choose the 4Kb stack config
> option and recompile.
>
> Alternatively, default to 4Kb and let people choose 8Kb and recompile
> if that's what suits their workloads.
>...

There is no workload where 8kB suits better.

> My 2 cents.
>
> 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