[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200804161620.43536.vda.linux@googlemail.com>
Date: Wed, 16 Apr 2008 16:20:43 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org
Subject: Re: Does process need to have a kernel-side stack all the time?
On Wednesday 16 April 2008 14:47, Ingo Molnar wrote:
> * Andi Kleen <andi@...stfloor.org> wrote:
>
> > Denys Vlasenko <vda.linux@...glemail.com> 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 ran
> 50,000 threads before it ran out of memory - i wanted it to run 100,000
> threads. The improved order-0 behavior was just icing on the cake.
And my "random thought" occurred along the lines "Ingo once ran
100000 threads and then ran out of space for stack... wait a minute!
Why every single one of those threads need to have a stack at the same time?
They sure as hell can't actively use more than NR_CPUS stacks at once!".
Pity it wouldn't work.
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists