LWN.net Logo

What's the benefit of 4K stacks anyway?

What's the benefit of 4K stacks anyway?

Posted Apr 22, 2010 4:33 UTC (Thu) by rhcoe (guest, #1101)
In reply to: What's the benefit of 4K stacks anyway? by pr1268
Parent article: Quotes of the week

Each process has a stack space allocated for running in kernel mode.
Having a 4K stack means that it only requires one page of memory per
process instead of two.

The difficulty from a kernel developer point of view is insuring that
no code path ever overruns the one page of stack.

The argument against it is that for most workloads, no process usually needs
more than 4K of stack, ie wasted, un-used space.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds