From owner-svn-src-all@FreeBSD.ORG Mon Mar 2 21:00:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A4F2E05; Mon, 2 Mar 2015 21:00:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B1A6619; Mon, 2 Mar 2015 21:00:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22L0sin094746; Mon, 2 Mar 2015 21:00:54 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22L0sv4094745; Mon, 2 Mar 2015 21:00:54 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503022100.t22L0sv4094745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 2 Mar 2015 21:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r279545 - stable/10/lib/libdevstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 21:00:55 -0000 Author: ken Date: Mon Mar 2 21:00:54 2015 New Revision: 279545 URL: https://svnweb.freebsd.org/changeset/base/279545 Log: 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 ------------------------------------------------------------------------ Modified: stable/10/lib/libdevstat/devstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdevstat/devstat.c ============================================================================== --- stable/10/lib/libdevstat/devstat.c Mon Mar 2 20:42:06 2015 (r279544) +++ stable/10/lib/libdevstat/devstat.c Mon Mar 2 21:00:54 2015 (r279545) @@ -1480,22 +1480,9 @@ devstat_compute_statistics(struct devsta *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 devsta } 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;