From 3afdc97d91c24192db51b67762126a8d99d433db Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Wed, 25 Oct 2023 18:22:25 -0400 Subject: ZIO: Remove READY pipeline stage from root ZIOs zio_root() has no arguments for ready callback or parent ZIO. Except one recent case in ZIL code if root ZIOs ever have a parent it is also a root ZIO. It means we do not need READY pipeline stage for them, which takes some time to process, but even more time to wait for the children and be woken by them, and both for no good reason. The most visible effect of this change is that it avoids one taskq wakeup per ZIL block written, previously used to run zio_ready() for lwb_root_zio and skipped now. Reviewed-by: Brian Behlendorf Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. Closes #15398 --- cmd/zdb/zdb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd/zdb') diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index b39a0e882..3c282f3fc 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -8716,8 +8716,6 @@ zdb_read_block(char *thing, spa_t *spa) BP_SET_CHECKSUM(bp, ck); spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); czio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); - czio->io_bp = bp; - if (vd == vd->vdev_top) { zio_nowait(zio_read(czio, spa, bp, pabd, psize, NULL, NULL, @@ -8736,7 +8734,8 @@ zdb_read_block(char *thing, spa_t *spa) } error = zio_wait(czio); if (error == 0 || error == ECKSUM) { - zio_t *ck_zio = zio_root(spa, NULL, NULL, 0); + zio_t *ck_zio = zio_null(NULL, spa, NULL, + NULL, NULL, 0); ck_zio->io_offset = DVA_GET_OFFSET(&bp->blk_dva[0]); ck_zio->io_bp = bp; -- cgit v1.2.3