Re: recursion bad?

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Sun, 21 Nov 1999 10:45:09 -0500


In message <19991121103122.A816@surfsouth.com>, Chad Miller writes:
+-----
| 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
+--->8

"kernel stack is too small" - it fits at the end of 2-page per-process area
which also holds the task_struct. This is also why the max symlink depth is
3 instead of something more common (and useful; 3 causes some grief for us
when so many things are symlinks into AFS and we use symlinks in AFS to
"version" software release areas).

-- 
brandon s. allbery	   os/2,linux,solaris,perl	allbery@kf8nh.apk.net
system administrator	   kthkrb,heimdal,gnome,rt	  allbery@ece.cmu.edu
carnegie mellon / electrical and computer engineering			kf8nh
    We are Linux. Resistance is an indication that you missed the point.

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