HomeFreeBSD

MFC, r279375

Description

MFC, r279375


r279375 | ken | 2015-02-27 14:35:36 -0700 (Fri, 27 Feb 2015) | 26 lines

Fix I/O size calculation for pass(4) driver requests and add latency
tracking.

It is important to subtract the residual from the requested
transfer size to see how much data was actually transferred.  With
tape drives in particular, it is common to request more data than is
returned.

Also, add I/O latency tracking for CAM requests issued by
cam_periph_runccb().

If the caller supplies a struct devstat, and the I/O is a SCSI or
ATA I/O, we will track the elapsed time to provide I/O latency
statistics for the request.

sys/cam/scsi/cam_periph.c:
	In cam_periph_runccb(), subtract the residual when reporting I/O
	totals to devstat(9) for SCSI and ATA passthrough requests.

	In cam_periph_runccb(), grab the I/O start time and supply
	the start time to devstat_end_transaction() so that it can
	calculate the elapsed I/O time.

Sponsored by:	Spectra Logic
MFC after:	1 week

------------------------------------------------------------------------

Sponsored by: Spectra Logic

Details

Provenance
kenAuthored on
Parents
rS280445: Do not include if_var.h and in6_var.h into kern_jail.c. It is now possible
Branches
Unknown
Tags
Unknown

Event Timeline