int zfs_vdev_max_pending = 10;
int zfs_vdev_min_pending = 4;
-/* deadline = pri + ddi_get_lbolt64() >> time_shift) */
-int zfs_vdev_time_shift = 6;
+/*
+ * The deadlines are grouped into buckets based on zfs_vdev_time_shift:
+ * deadline = pri + gethrtime() >> time_shift)
+ */
+int zfs_vdev_time_shift = 29; /* each bucket is 0.537 seconds */
/* exponential I/O issue ramp-up rate */
int zfs_vdev_ramp_rate = 2;
mutex_enter(&vq->vq_lock);
- zio->io_timestamp = ddi_get_lbolt64();
+ zio->io_timestamp = gethrtime();
zio->io_deadline = (zio->io_timestamp >> zfs_vdev_time_shift) +
zio->io_priority;
avl_remove(&vq->vq_pending_tree, zio);
- zio->io_delta = ddi_get_lbolt64() - zio->io_timestamp;
- vq->vq_io_complete_ts = ddi_get_lbolt64();
+ zio->io_delta = gethrtime() - zio->io_timestamp;
+ vq->vq_io_complete_ts = gethrtime();
vq->vq_io_delta_ts = vq->vq_io_complete_ts - zio->io_timestamp;
for (i = 0; i < zfs_vdev_ramp_rate; i++) {