how is it different from kernel memory at that point? ;)
It resides in user space, and for my research it makes a difference.
From a purely OS theoretical point of view, I find it a good idea for
the application to provide resources to the kernel when it executes on
the application's behalf. For example, when writing to a socket, the
kernel copies data into its buffers, thus wasting common resources
needed by all applications. It would be better, perhaps, to "penalise"
the application by making it give up some of its resources.
the stack size is actually used in many places, there is "special" data
stored at the end of the stack that is used from all over the place (for
example, "current" comes from there), and the way you find it is by
knowing the stack size (4Kb or 8kb) and doing bitmasks on the stack
pointer to calculate the top of the stack. Even if the actual memory is
bigger than 4Kb/8Kb, this is still an issue ;)
Another "fun" issue is that the kernel tends to expect you can do dma
from the stack. if you cross the page boundary, and the 2 pages aren't
consecutive in physical memory, that is a big problem.... because your
DMA would need to be split which you can't really. This is also why
doing 8Kb (or bigger) stacks in the kernel is painful, they have to by
physically contiguous, so all the VM fragmentation issues come into full
force.
OK, these are much bigger issues than swapping. So I guess the answer
would be "no" :-(
Thanks for your help,
Elad
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/