MFV r248660:

Merge vendor change - modify time processing in deadman thread.

Illumos ZFS issues:
  3618 ::zio dcmd does not show timestamp data

MFC after:	3 weeks
This commit is contained in:
Martin Matuska 2013-04-06 17:15:47 +00:00
commit 95e7edacfe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249206
4 changed files with 13 additions and 12 deletions

View File

@ -104,8 +104,7 @@ 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;
kmutex_t vq_lock;
};

View File

@ -443,7 +443,7 @@ struct zio {
uint64_t io_offset;
uint64_t io_deadline;
uint64_t io_timestamp;
hrtime_t io_timestamp;
avl_node_t io_offset_node;
avl_node_t io_deadline_node;
avl_tree_t *io_vdev_tree;

View File

@ -3200,10 +3200,10 @@ vdev_deadman(vdev_t *vd)
* the spa_deadman_synctime we panic the system.
*/
fio = avl_first(&vq->vq_pending_tree);
delta = ddi_get_lbolt64() - fio->io_timestamp;
if (delta > NSEC_TO_TICK(spa_deadman_synctime(spa))) {
zfs_dbgmsg("SLOW IO: zio timestamp %llu, "
"delta %llu, last io %llu",
delta = gethrtime() - fio->io_timestamp;
if (delta > spa_deadman_synctime(spa)) {
zfs_dbgmsg("SLOW IO: zio timestamp %lluns, "
"delta %lluns, last io %lluns",
fio->io_timestamp, delta,
vq->vq_io_complete_ts);
fm_panic("I/O to pool '%s' appears to be "

View File

@ -44,8 +44,11 @@
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;
@ -391,7 +394,7 @@ vdev_queue_io(zio_t *zio)
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;
@ -424,8 +427,7 @@ vdev_queue_io_done(zio_t *zio)
avl_remove(&vq->vq_pending_tree, zio);
vq->vq_io_complete_ts = ddi_get_lbolt64();
vq->vq_io_delta_ts = vq->vq_io_complete_ts - zio->io_timestamp;
vq->vq_io_complete_ts = gethrtime();
for (int i = 0; i < zfs_vdev_ramp_rate; i++) {
zio_t *nio = vdev_queue_io_to_issue(vq, zfs_vdev_max_pending);