aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_backend_block.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-09-25 10:14:39 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-09-25 10:14:39 +0000
commite675024a023fa6c17709a0241f7b5a29776b6330 (patch)
treebbec0eeb0dd55b37dde8925cadf8a16db2b137af /sys/cam/ctl/ctl_backend_block.c
parent6c068d4bf3928c71edee691ec57fafa60107c309 (diff)
downloadsrc-e675024a023fa6c17709a0241f7b5a29776b6330.tar.gz
src-e675024a023fa6c17709a0241f7b5a29776b6330.zip
Switch I/O time accounting from system time to uptime.
While there, make num_dmas accounted independently of CTL_TIME_IO.
Notes
Notes: svn path=/head/; revision=288215
Diffstat (limited to 'sys/cam/ctl/ctl_backend_block.c')
-rw-r--r--sys/cam/ctl/ctl_backend_block.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index a37ac7bd05bf..3e280b365f24 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -405,11 +405,11 @@ ctl_be_block_move_done(union ctl_io *io)
DPRINTF("entered\n");
#ifdef CTL_TIME_IO
- getbintime(&cur_bt);
+ getbinuptime(&cur_bt);
bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt);
bintime_add(&io->io_hdr.dma_bt, &cur_bt);
+#endif
io->io_hdr.num_dmas++;
-#endif
io->scsiio.kern_rel_offset += io->scsiio.kern_data_len;
/*
@@ -563,8 +563,8 @@ ctl_be_block_biodone(struct bio *bio)
ctl_serseq_done(io);
}
#ifdef CTL_TIME_IO
- getbintime(&io->io_hdr.dma_start_bt);
-#endif
+ getbinuptime(&io->io_hdr.dma_start_bt);
+#endif
ctl_datamove(io);
}
}
@@ -785,8 +785,8 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
ctl_serseq_done(io);
}
#ifdef CTL_TIME_IO
- getbintime(&io->io_hdr.dma_start_bt);
-#endif
+ getbinuptime(&io->io_hdr.dma_start_bt);
+#endif
ctl_datamove(io);
}
}
@@ -956,8 +956,8 @@ ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun,
ctl_serseq_done(io);
}
#ifdef CTL_TIME_IO
- getbintime(&io->io_hdr.dma_start_bt);
-#endif
+ getbinuptime(&io->io_hdr.dma_start_bt);
+#endif
ctl_datamove(io);
}
}
@@ -1663,8 +1663,8 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun,
} else {
SDT_PROBE(cbb, kernel, write, alloc_done, 0, 0, 0, 0, 0);
#ifdef CTL_TIME_IO
- getbintime(&io->io_hdr.dma_start_bt);
-#endif
+ getbinuptime(&io->io_hdr.dma_start_bt);
+#endif
ctl_datamove(io);
}
}