summaryrefslogtreecommitdiffstats
path: root/include/sys/vdev_impl.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-08-05 13:57:59 -0700
committerBrian Behlendorf <[email protected]>2014-08-11 08:44:54 -0700
commit50b25b2187134ac7b19cf93bd35a420223f1d343 (patch)
tree266c3960875762f8243847ad51a96416998e50ac /include/sys/vdev_impl.h
parentab6f407faa0188219fb4852ac5e05f1934c985ee (diff)
Avoid dynamic allocation of 'search zio'
As part of commit e8b96c6 the search zio used by the vdev_queue_io_to_issue() function was moved to the heap to minimize stack usage. Functionally this is fine, but to maximize performance it's best to minimize the number of dynamic allocations. To avoid this allocation temporary space for the search zio has been reserved in the vdev_queue structure. All access must be serialized through the vq_lock. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #2572
Diffstat (limited to 'include/sys/vdev_impl.h')
-rw-r--r--include/sys/vdev_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h
index 16cf4d770..16fcaa042 100644
--- a/include/sys/vdev_impl.h
+++ b/include/sys/vdev_impl.h
@@ -118,6 +118,7 @@ struct vdev_queue {
hrtime_t vq_io_complete_ts; /* time last i/o completed */
hrtime_t vq_io_delta_ts;
list_t vq_io_list;
+ zio_t vq_io_search; /* used as local for stack reduction */
kmutex_t vq_lock;
};