Messages in this thread | | | From | Nikita Danilov <> | Date | Wed, 21 Dec 2005 01:54:16 +0300 | Subject | Re: About 4k kernel stack size.... |
| |
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.
> the pages would not > have to be contiguous so dynamic stack allocation > would practically never fail. But Linux doesn't > use paged virtual memory for stacks. So, there > needs to be some rule to control the amount > of kernel stack allocated to each task when it > executes a system call. > > This means, in the limit, that there are two > possibilities: > > (1) Implement paged virtual memory for stack.
As an exercise: subscribe to NT kernel development mailing list, and see the fun they have when page-in code trips over paged out kernel text page. As a rule, even code cannot pageable without very involving and fragile analysis. Not to say about stack.
Nikita. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |