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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]