aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2013-03-21 14:47:36 -0800
committerBrian Behlendorf <[email protected]>2013-08-12 16:46:50 -0700
commitcb682a173a84813b2aeb5d18f58cff1a07531fb3 (patch)
tree7139dec4e92bccbf18744b8543abd1e408846dff /include/sys
parent570d6edf1d94917aab49c5755027d05b3c7bcd43 (diff)
Illumos #3618 ::zio dcmd does not show timestamp data
3618 ::zio dcmd does not show timestamp data Reviewed by: Adam Leventhal <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Christopher Siden <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Approved by: Dan McDonald <[email protected]> References: http://www.illumos.org/issues/3618 illumos/illumos-gate@c55e05cb35da47582b7afd38734d2f0d9c6deb40 Notes on porting to ZFS on Linux: The original changeset mostly deals with mdb ::zio dcmd. However, in order to provide the requested functionality it modifies vdev and zio structures to keep the timing data in nanoseconds instead of ticks. It is these changes that are ported over in the commit in hand. One visible change of this commit is that the default value of 'zfs_vdev_time_shift' tunable is changed: zfs_vdev_time_shift = 6 to zfs_vdev_time_shift = 29 The original value of 6 was inherited from OpenSolaris and was subotimal - since it shifted the raw tick value - it didn't compensate for different tick frequencies on Linux and OpenSolaris. The former has HZ=1000, while the latter HZ=100. (Which itself led to other interesting performance anomalies under non-trivial load. The deadline scheduler delays the IO according to its priority - the lower priority the further the deadline is set. The delay is measured in units of "shifted ticks". Since the HZ value was 10 times higher, the delay units were 10 times shorter. Thus really low priority IO like resilver (delay is 10 units) and scrub (delay is 20 units) were scheduled much sooner than intended. The overall effect is that resilver and scrub IO consumed more bandwidth at the expense of the other IO.) Now that the bookkeeping is done is nanoseconds the shift behaves correctly for any tick frequency (HZ). Ported-by: Cyril Plisko <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1643
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/vdev_impl.h4
-rw-r--r--include/sys/zio.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h
index 711408e6a..e0669cc0b 100644
--- a/include/sys/vdev_impl.h
+++ b/include/sys/vdev_impl.h
@@ -105,8 +105,8 @@ struct vdev_queue {
avl_tree_t vq_read_tree;
avl_tree_t vq_write_tree;
avl_tree_t vq_pending_tree;
- uint64_t vq_io_complete_ts;
- uint64_t vq_io_delta_ts;
+ hrtime_t vq_io_complete_ts;
+ hrtime_t vq_io_delta_ts;
list_t vq_io_list;
kmutex_t vq_lock;
};
diff --git a/include/sys/zio.h b/include/sys/zio.h
index 03530330c..189966bef 100644
--- a/include/sys/zio.h
+++ b/include/sys/zio.h
@@ -410,8 +410,8 @@ struct zio {
uint64_t io_offset;
uint64_t io_deadline; /* expires at timestamp + deadline */
- uint64_t io_timestamp; /* submitted at (ticks) */
- uint64_t io_delta; /* vdev queue service delta (ticks) */
+ hrtime_t io_timestamp; /* submitted at */
+ hrtime_t io_delta; /* vdev queue service delta */
uint64_t io_delay; /* vdev disk service delta (ticks) */
avl_node_t io_offset_node;
avl_node_t io_deadline_node;