lkml.org 
[lkml]   [2008]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Does process need to have a kernel-side stack all the time?
On Wed, 16 Apr 2008 16:20:43 +0200
Denys Vlasenko <vda.linux@googlemail.com> wrote:

>
> 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.

you could make it work ... sort of.
That is, you can deal with the case with apps that sleep on select/poll/sleep
(which is the majority)
by starting out at a small stack (say 512 bytes), and then in the syscall code switch
to a 4Kb stack for all but these 3 "known to not go deep but normal sleepers" syscalls.

I doubt it's worth the complexity, but it very likely could be made to work.... it's just
going to get very messy (how to deal with "current" is just the start of the messyness)

--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2008-04-16 16:37    [from the cache]
©2003-2011 Jasper Spaans