diff options
author | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
commit | 65145fa4c81da358fcbc3b650156dab705dfa34e (patch) | |
tree | 55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /lib/libdevstat | |
parent | 60ff4eb0dff94a04d75d0d52a3957aaaf5f8c693 (diff) | |
parent | e6b664c390af88d4a87208bc042ce503da664c3b (diff) | |
download | FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.zip FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.tar.gz |
Merge sync of head
Diffstat (limited to 'lib/libdevstat')
-rw-r--r-- | lib/libdevstat/Makefile | 3 | ||||
-rw-r--r-- | lib/libdevstat/devstat.c | 24 |
2 files changed, 4 insertions, 23 deletions
diff --git a/lib/libdevstat/Makefile b/lib/libdevstat/Makefile index aeb07b9..dcda3c2 100644 --- a/lib/libdevstat/Makefile +++ b/lib/libdevstat/Makefile @@ -7,8 +7,7 @@ SHLIB_MAJOR= 7 SRCS= devstat.c INCS= devstat.h -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm MAN= devstat.3 diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c index ade8738..d52332b 100644 --- a/lib/libdevstat/devstat.c +++ b/lib/libdevstat/devstat.c @@ -1487,22 +1487,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) { @@ -1512,11 +1499,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; |