How much kernel stack do we need?

Bernd Schmidt (crux@Pool.Informatik.RWTH-Aachen.DE)
Fri, 19 Jun 1998 11:20:49 +0200 (MET DST)


In 2.1.x kernels, the kernel stack size is 8192 bytes (2 pages) on the i386,
minus the size of the task structure (around 1000). This means the stack is
more than 3000 bytes larger than in 2.0.x where it used to be one page. My
question is: do we really need this?

I've built a "con tutto" 2.1.106 kernel with all config options that would
compile turned on and ran the stack checker script that was posted to the list
about a year ago. I'd post detailed results, but I forgot them at home. The
bottom line is: there is only a handful of functions that really need a lot
of stack (more than 256 bytes), and only two or three really awful cases
that allocate a 2000 byte array on the stack. Does anyone else think it
would be worthwhile to fix those and reduce the kernel stack size again?
I have a patch that makes the stack size configurable (I've even tested it...)
which I could provide if someone is interested.

Bernd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu