> I'm unclear why the pages need to be physically contiguous, though. Is this > a limitation in the x86 architecture? there is code that does dma to/from the stack, and even non-contigous takes twice the memory use. There's also really hard problems with this. The stack needs to be there EARLY on kernel entry. Really early. Physically contigous helps to keep that manageable. In addition, on x86 the total amount of non-physical contigous memory you can allocate is like 64Mb to 192Mb (depending on which PCI cards you have). That's not a lot of stack... esp since this space is shared with all other virtual allocs. > I'm also curious if there are any good static analysis tools that can be > run against the kernel source to compute worst-case stack depth? Surely > someone in the gcc group has come up with such a critter? We used a simple "per function" one. someone on lkml has done callchains in addition and it's really not too bad after we fixed a lot of the per function violators. (note: we did that before shipping fc2 mostly)
Attachment:
signature.asc
Description: This is a digitally signed message part