diff options
author | Matthew Ahrens <[email protected]> | 2018-08-02 15:51:45 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-08-02 15:51:45 -0700 |
commit | 62840030a7dceaee013ddbcc1eebcfc7922edf7c (patch) | |
tree | 793c26621902f7094be3120aee5821e447e38b97 /include/sys | |
parent | 499b5497cbc62a4db35227bc98c6244454dfab4c (diff) |
Reduce taskq and context-switch cost of zio pipe
When doing a read from disk, ZFS creates 3 ZIO's: a zio_null(), the
logical zio_read(), and then a physical zio. Currently, each of these
results in a separate taskq_dispatch(zio_execute).
On high-read-iops workloads, this causes a significant performance
impact. By processing all 3 ZIO's in a single taskq entry, we reduce the
overhead on taskq locking and context switching. We accomplish this by
allowing zio_done() to return a "next zio to execute" to zio_execute().
This results in a ~12% performance increase for random reads, from
96,000 iops to 108,000 iops (with recordsize=8k, on SSD's).
Reviewed by: Pavel Zakharov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed by: George Wilson <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
External-issue: DLPX-59292
Closes #7736
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/zio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sys/zio.h b/include/sys/zio.h index bca861d18..d32a42833 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -262,7 +262,7 @@ enum zio_child { #define ZIO_CHILD_DDT_BIT ZIO_CHILD_BIT(ZIO_CHILD_DDT) #define ZIO_CHILD_LOGICAL_BIT ZIO_CHILD_BIT(ZIO_CHILD_LOGICAL) #define ZIO_CHILD_ALL_BITS \ - (ZIO_CHILD_VDEV_BIT | ZIO_CHILD_GANG_BIT | \ + (ZIO_CHILD_VDEV_BIT | ZIO_CHILD_GANG_BIT | \ ZIO_CHILD_DDT_BIT | ZIO_CHILD_LOGICAL_BIT) enum zio_wait_type { @@ -408,7 +408,7 @@ typedef struct zio_transform { struct zio_transform *zt_next; } zio_transform_t; -typedef int zio_pipe_stage_t(zio_t *zio); +typedef zio_t *zio_pipe_stage_t(zio_t *zio); /* * The io_reexecute flags are distinct from io_flags because the child must |