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

From: Phillip Susi
Date: Wed Jul 18 2007 - 13:19:54 EST


Matt Mackall wrote:
As far as I'm aware, the actual reason for 4K stacks is that after the system has been up and running for some time getting "1 physically contiguous pages" becomes significantly easier than 2 which wouldn't be arbitrary.

If there are exactly two free pages in the system, the odds of them
being buddies (ie adjacent AND properly aligned) is quite small. The
available page pool has to grow quite a bit before the availability of
order-1 page pairs approaches 100%.

So if we fail to allocate an 8k stack when we could have allocated a
4k stack, we're almost certainly failing significantly prematurely.

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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/