Inline zio_notify_parent() to reduce stack use
Deep recursive call chains are contributing to segfaults in ztest due to heavy stack use. Inlining zio_notify_parent() helps reduce the stack depth of the zio_notify_parent() -> zio_execute() -> zio_done() recursive cycle. I am no longer seeing ztest segfaults in this code path with this change combined with the zio_done() stack reduction in the previous commit. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
ca5262f030
commit
dd72f3d647
|
@ -435,7 +435,8 @@ zio_wait_for_children(zio_t *zio, enum zio_child child, enum zio_wait_type wait)
|
|||
return (waiting);
|
||||
}
|
||||
|
||||
static void
|
||||
__attribute__((always_inline))
|
||||
static inline void
|
||||
zio_notify_parent(zio_t *pio, zio_t *zio, enum zio_wait_type wait)
|
||||
{
|
||||
uint64_t *countp = &pio->io_children[zio->io_child_type][wait];
|
||||
|
|
Loading…
Reference in New Issue