Kernel Stack Sizes

Arjan van de Ven arjanv at redhat.com
Fri Jun 18 06:27:33 UTC 2004


> 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)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20040618/140f8ed6/attachment.sig>


More information about the fedora-devel-list mailing list