Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...?

Rene Herman
2007-07-18T17:34:15Z

On 07/18/2007 07:19 PM, Phillip Susi wrote:

> Why do the two pages have to be physically contiguous? The stack just
> needs to be two contiguous pages in virtual memory, but they can map to
> any two pages anywhere in physical memory.

As far as I'm aware that's just a consequence of the way linux does memory
management. If we ignore highmem, virtual memory is simply +/- PAGE_OFFSET
away from physical so allocating virtually contiguous pages that are _not_
physically contiguous requires mapping them somewhere (the vmalloc area)
which is limited. Given that large number of threads _are_ the problem you
wouldn't solve things -- you'd again be out of space, although now for a
different reason.

Rene.