Inline zio_execute() to reduce stack use

Deep recursive call chains are contributing to segfaults in ztest due to
heavy stack use.  Inlining zio_execute() helps reduce the stack depth of
the zio_notify_parent() -> zio_execute() -> zio_wait() recursive cycle.
I am no longer seeing ztest segfaults in this code path with this change.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Ned Bass 2010-07-30 15:23:29 -07:00 committed by Brian Behlendorf
parent 526d004cf5
commit 411dd65af1
1 changed files with 2 additions and 1 deletions

View File

@ -1119,7 +1119,8 @@ zio_interrupt(zio_t *zio)
*/ */
static zio_pipe_stage_t *zio_pipeline[]; static zio_pipe_stage_t *zio_pipeline[];
void __attribute__((always_inline))
inline void
zio_execute(zio_t *zio) zio_execute(zio_t *zio)
{ {
zio->io_executor = curthread; zio->io_executor = curthread;