zfs/module
Ned Bass 4d3fc57112 Reduce stack usage for recursive dbuf_hold_impl()
This commit preserves the recursive function dbuf_hold_impl() but moves
the local variables and function arguments to the heap to minimize
the stack frame size.  Enough space is initially allocated on the
stack for 20 levels of recursion.  This technique was based on commit
34229a2f2a which reduced stack usage of
traverse_visitbp().

dbuf_hold_impl() is mutually recursive with dbuf_findbp(),
but the latter function is also called from other functions.
Therefore dbuf_findbp() must contain logic to determine how to call
dbuf_hold_impl().  To this end, dbuf_hold_impl() now takes a
struct dbuf_hold_impl_data pointer as an argument.  If that argument
is NULL it calls dbuf_hold_impl() as before, otherwise it calls
__debuf_hold_impl() with a single dbuf_hold_impl_data pointer argument.
As the name implies, dbuf_hold_impl_data stores the arguments and local
variables for dbuf_hold_impl().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-02 14:12:31 -07:00
..
avl Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
nvpair Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
unicode Add unicode library 2009-01-05 12:03:23 -08:00
zcommon Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
zfs Reduce stack usage for recursive dbuf_hold_impl() 2010-08-02 14:12:31 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00