recursion bad?

Chad Miller (cmiller@surfsouth.com)
Sun, 21 Nov 1999 10:31:22 -0500


Hi there. I'm implementing union-mount, and I find the need to store
info on a stack. My question is: I see a good bit of code that could
have been recursively written, but prolly intentionally wasn't. Is
there a reason, like ``recursion is frowned upon in the kernel?'' Or
is it, ``iterative, while more confusing to read and write, is more
efficient.''

I'd rather use the execution stack than code my own stack and worry about
memory management (which I'm still not comfortable with, in the kernel).
Recursive calls would be fairly rare -- only at crossing mountpoints on
unioned mounts.

- chad

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/