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

From: Adrian Bunk
Date: Wed Nov 16 2005 - 13:44:56 EST


On Wed, Nov 16, 2005 at 05:10:04PM +0100, Andi Kleen wrote:
> On Wednesday 16 November 2005 16:38, Arjan van de Ven wrote:
> > On Wed, 2005-11-16 at 16:30 +0100, Oliver Neukum wrote:
> > > Am Mittwoch, 16. November 2005 15:42 schrieb jmerkey:
> > > > Map a blank ro page beneath the address range when stack memory is
> > > > mapped is trap on page faults to the page when folks go off the end of
> > > > th e stack.
> > > >
> > > > Easy to find.
> > >
> > > Provided you can easily trigger it. I don't see how that is a given.
> >
> > the same is true for a unified 8k stack or for the 4k/4k split though.
> > Ok sure there's a 1.5Kb difference on the one side.. (but a 2Kb gain on
> > the other side)
>
> I was always in favour of 8K process stacks + irq stacks. Works great on x86-64.

Jörn did some analysis regarding possible call paths > 3k.

Our goal is to achieve a stack usage < 3k with a safety margin of 1k.

The problem is similar no matter whether you have 4k or 8k stacks, but
with 4k stacks you have the additional benefits of order 0 allocations
and less memory usage.

> -Andi

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/