From: Nikita Danilov <nikita@clusterfs.com>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: "Linux-Kernel," <linux-kernel@vger.kernel.org>
Subject: Re: About 4k kernel stack size....
Date: Wed, 21 Dec 2005 18:19:17 +0300 [thread overview]
Message-ID: <17321.29301.978623.281668@gargle.gargle.HOWL> (raw)
In-Reply-To: <Pine.LNX.4.61.0512210923580.11743@chaos.analogic.com>
linux-os (Dick Johnson) writes:
>
> On Wed, 21 Dec 2005, Nikita Danilov wrote:
>
> > linux-os (Dick Johnson) writes:
> > >
> > > On Tue, 20 Dec 2005, Nikita Danilov wrote:
> > >
> > > > linux-os \(Dick Johnson\) writes:
> > > > >
> > > >
> > > > [...]
> > > >
> > > > > See, isn't rule-making fun? This whole 4k stack-
> > > > > thing is really dumb. Other operating systems
> > > > > use paged virtual memory for stacks, except
> > > > > for the interrupt stack. If Linux used paged
> > > > > virtual memory for stacks,
> > > >
> > > > ... then spin-locks couldn't be held across function calls.
> > > >
> > >
> > > Sure they can! In ix86 machines the local 'cli' within the
> >
> > Sure they cannot: one cannot schedule with spin-lock held, and major
> > page fault will block for IO.
> >
> > [...]
> >
>
> Read the text you deleted and you will learn how.
I am afraid, I'd better not:
- spin-locks do not imply disabled interrupts;
- how can "swapper" guarantee that there is enough pages in the free
list to satisfy stack page faults atomically? The only way is to keep
free page for each thread. But then it's so much easier to just use
this reserved page for the stack from the very beginning.
Note, that RSX/RT didn't have "kernel threads" at all: it was
implemented as a non-blocking state machine serving user requests on
per-cpu stacks (at least pdp-15 versions).
>
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.6.13.4 on an i686 machine (5589.55 BogoMips).
> Warning : 98.36% of all statistics are fiction.
> .
Nikita.
next prev parent reply other threads:[~2005-12-21 15:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-18 22:14 J.A. Magallon
2005-12-20 2:52 ` Mark Lord
2005-12-20 13:37 ` Adrian Bunk
2005-12-20 14:37 ` Mike Snitzer
2005-12-20 15:00 ` Adrian Bunk
[not found] ` <46578.10.10.10.28.1135094132.squirrel@linux1>
2005-12-20 15:55 ` Sean
2005-12-21 15:07 ` Giridhar Pemmasani
2005-12-21 15:37 ` Kyle Moffett
2005-12-21 16:25 ` Giridhar Pemmasani
2005-12-21 16:46 ` Christoph Hellwig
2005-12-21 20:14 ` Krzysztof Halasa
2005-12-21 21:39 ` linux-os (Dick Johnson)
2005-12-22 9:14 ` Romano Giannetti
2005-12-20 17:02 ` linux-os (Dick Johnson)
2005-12-20 18:06 ` Chase Venters
2005-12-20 18:36 ` linux-os (Dick Johnson)
2005-12-20 18:43 ` Arjan van de Ven
2005-12-20 18:59 ` linux-os (Dick Johnson)
2005-12-20 22:33 ` Alan Cox
2005-12-20 22:54 ` Nikita Danilov
2005-12-21 14:02 ` linux-os (Dick Johnson)
2005-12-21 14:18 ` Nikita Danilov
2005-12-21 14:25 ` linux-os (Dick Johnson)
2005-12-21 15:19 ` Nikita Danilov [this message]
2005-12-21 22:50 ` Jan Engelhardt
2005-12-20 20:15 ` Alan Cox
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=17321.29301.978623.281668@gargle.gargle.HOWL \
--to=nikita@clusterfs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.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®