Re: Does process need to have a kernel-side stack all the time?

From: Arjan van de Ven
Date: Wed Apr 16 2008 - 09:55:18 EST


On Wed, 16 Apr 2008 14:47:28 +0200
Ingo Molnar <mingo@xxxxxxx> wrote:

>
> * Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
>
> > Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx> writes:
> >
> > > A lot of effort went into minimizing of stack usage.
> > > If I understand it correctly, one of the reasons for this
> > > was to be efficient and not have lots of pages
> > > used for stacks when we have a lot of threads
> > > (tens of thousands).
> >
> > Actually the real reason the 4K stacks were introduced IIRC was
> > that the VM is not very good at allocation of order > 0 pages and
> > that only using order 0 and not order 1 in normal operation
> > prevented some stalls.
>
> no, the primary motivation Arjan and me started working on 4K stacks
> and implemented it was what Denys mentioned: i had a testcase that

well that and the fact that RH had customers who had major issues at fewer threads
with 8Kb versus fragmentation.
on 32 bit with a bunch of ram, there's just not enough lowmem around to not have it
fragmented to hell and back.


x86_64 is better off there, it doesn't really have lowmem, and also buddy works better
against fragmentation the bigger the zone it works with it seems
(or at least, the lower the ratio of long term pinned pages is)


--
If you want to reach me at my work email, use arjan@xxxxxxxxxxxxxxx
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/