diff options
author | ken <ken@FreeBSD.org> | 2015-03-02 21:00:54 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2015-03-02 21:00:54 +0000 |
commit | dc6b22c8f3aa5e564a872a3172eda2972614412f (patch) | |
tree | d187c8ee035dbc8803c62ff25e9b2543da38071d /lib/libdevstat | |
parent | de8b80a46a89ecabb93a2c171a1d9018a709cbad (diff) | |
download | FreeBSD-src-dc6b22c8f3aa5e564a872a3172eda2972614412f.zip FreeBSD-src-dc6b22c8f3aa5e564a872a3172eda2972614412f.tar.gz |
MFC r279346:
------------------------------------------------------------------------
r279346 | ken | 2015-02-26 19:44:12 -0700 (Thu, 26 Feb 2015) | 13 lines
Remove an obsolete comment in devstat(3) about the accuracy of the
milliseconds per transaction (DSM_MS_PER_TRANSACTION) calculation.
The comment was accurate many years ago when the kernel didn't
record I/O times on a per-I/O basis, but now that we do collect
that information in most areas, it isn't correct.
The milliseconds per transaction values are correct, assuming the
I/O duration has been recorded.
Sponsored by: Spectra Logic
------------------------------------------------------------------------
Diffstat (limited to 'lib/libdevstat')
-rw-r--r-- | lib/libdevstat/devstat.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c index 0f313fb..2992df1 100644 --- a/lib/libdevstat/devstat.c +++ b/lib/libdevstat/devstat.c @@ -1480,22 +1480,9 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous, *destld = 0.0; break; /* - * This calculation is somewhat bogus. It simply divides - * the elapsed time by the total number of transactions - * completed. While that does give the caller a good - * picture of the average rate of transaction completion, - * it doesn't necessarily give the caller a good view of - * how long transactions took to complete on average. - * Those two numbers will be different for a device that - * can handle more than one transaction at a time. e.g. - * SCSI disks doing tagged queueing. - * - * The only way to accurately determine the real average - * time per transaction would be to compute and store the - * time on a per-transaction basis. That currently isn't - * done in the kernel, and would only be desireable if it - * could be implemented in a somewhat non-intrusive and high - * performance way. + * Some devstat callers update the duration and some don't. + * So this will only be accurate if they provide the + * duration. */ case DSM_MS_PER_TRANSACTION: if (totaltransfers > 0) { @@ -1505,11 +1492,6 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous, } else *destld = 0.0; break; - /* - * As above, these next two really only give the average - * rate of completion for read and write transactions, not - * the average time the transaction took to complete. - */ case DSM_MS_PER_TRANSACTION_READ: if (totaltransfersread > 0) { *destld = totaldurationread; |