mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Does process need to have a kernel-side stack all the time?
Date: Wed, 16 Apr 2008 07:34:09 -0700	[thread overview]
Message-ID: <20080416073409.15cf9481@laptopd505.fenrus.org> (raw)
In-Reply-To: <200804161620.43536.vda.linux@googlemail.com>

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

  reply	other threads:[~2008-04-16 14:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14 13:47 Denys Vlasenko
2008-04-14 14:17 ` Denis V. Lunev
2008-04-14 14:54   ` Denys Vlasenko
2008-04-14 15:21     ` Ingo Molnar
2008-04-14 17:44 ` Andi Kleen
2008-04-14 18:42   ` Denys Vlasenko
2008-04-16 12:47   ` Ingo Molnar
2008-04-16 13:02     ` Andi Kleen
2008-04-16 13:54     ` Arjan van de Ven
2008-04-16 13:59       ` Andi Kleen
2008-04-16 14:31         ` Arjan van de Ven
2008-04-16 14:20     ` Denys Vlasenko
2008-04-16 14:34       ` Arjan van de Ven [this message]
2008-04-14 23:21 ` Chris Snook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080416073409.15cf9481@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=vda.linux@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®