Re: [-mm patch] i386: enable 4k stacks by default

Andi Kleen
2007-04-30T18:51:48Z

On Mon, Apr 30, 2007 at 10:38:19AM -0700, William Lee Irwin III wrote:
> On Mon, Apr 30, 2007 at 02:13:16PM +0200, Andi Kleen wrote:
> > Actually looking at the code it would need some fixes first:
> > /*
> > * These should really be __section__(".bss.page_aligned") as well, but
> > * gcc's 3.0 and earlier don't handle that correctly.
> > */
> > static char softirq_stack[NR_CPUS * THREAD_SIZE]
> > __attribute__((__aligned__(THREAD_SIZE)));
> >
> > static char hardirq_stack[NR_CPUS * THREAD_SIZE]
> > __attribute__((__aligned__(THREAD_SIZE)));
> >
> > With 8K stacks and NR_CPUS==128 that would be 2MB statically reserved. Yuck.
> > Really needs to be dynamically allocated. I'll take a look once the .22
> > big merge is done.
>
> Here's what I did for i386 for someone concerned about blowing the stack.

Looks all good, except for the larger than 8k stack options.
I'll merge it up once the big merge is out of the way.

-Andi