From 411dd65af1a3f931cee72adc6b9817187ae112cf Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 30 Jul 2010 15:23:29 -0700 Subject: [PATCH] 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 --- module/zfs/zio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 75807bd30e..cf9b99e56f 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -1119,7 +1119,8 @@ zio_interrupt(zio_t *zio) */ static zio_pipe_stage_t *zio_pipeline[]; -void +__attribute__((always_inline)) +inline void zio_execute(zio_t *zio) { zio->io_executor = curthread;