From owner-svn-src-all@freebsd.org Thu Aug 24 22:11:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4B62DE9009; Thu, 24 Aug 2017 22:11:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B15C867D57; Thu, 24 Aug 2017 22:11:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7OMBA7f012583; Thu, 24 Aug 2017 22:11:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7OMBAlc012582; Thu, 24 Aug 2017 22:11:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708242211.v7OMBAlc012582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 Aug 2017 22:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322863 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 322863 X-SVN-Commit-Repository: base 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.23 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: Thu, 24 Aug 2017 22:11:12 -0000 Author: imp Date: Thu Aug 24 22:11:10 2017 New Revision: 322863 URL: https://svnweb.freebsd.org/changeset/base/322863 Log: Expand the latency tracking array from 1.024s to 8.192s to help track extreme outliers from dodgy drives. Adjust comments to reflect this, and make sure that the number of latency buckets match in the two places where it matters. Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Thu Aug 24 22:10:58 2017 (r322862) +++ head/sys/cam/cam_iosched.c Thu Aug 24 22:11:10 2017 (r322863) @@ -233,7 +233,7 @@ struct iop_stats { uint32_t state_flags; #define IOP_RATE_LIMITED 1u -#define LAT_BUCKETS 12 /* < 1ms < 2ms ... 512ms < 1024ms > 1024ms */ +#define LAT_BUCKETS 15 /* < 1ms < 2ms ... < 2^(n-1)ms >= 2^(n-1)ms*/ uint64_t latencies[LAT_BUCKETS]; struct cam_iosched_softc *softc; @@ -1520,7 +1520,7 @@ isqrt64(uint64_t val) return res; } -static sbintime_t latencies[] = { +static sbintime_t latencies[LAT_BUCKETS - 1] = { SBT_1MS << 0, SBT_1MS << 1, SBT_1MS << 2, @@ -1531,7 +1531,10 @@ static sbintime_t latencies[] = { SBT_1MS << 7, SBT_1MS << 8, SBT_1MS << 9, - SBT_1MS << 10 + SBT_1MS << 10, + SBT_1MS << 11, + SBT_1MS << 12, + SBT_1MS << 13 /* 8.192s */ }; static void