From patchwork Sun Jun 9 11:14:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 10983605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70A0692A for ; Sun, 9 Jun 2019 11:14:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53CB328800 for ; Sun, 9 Jun 2019 11:14:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4660A28A20; Sun, 9 Jun 2019 11:14:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3504828800 for ; Sun, 9 Jun 2019 11:14:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728290AbfFILOl (ORCPT ); Sun, 9 Jun 2019 07:14:41 -0400 Received: from forwardcorp1p.mail.yandex.net ([77.88.29.217]:49184 "EHLO forwardcorp1p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728029AbfFILOl (ORCPT ); Sun, 9 Jun 2019 07:14:41 -0400 Received: from mxbackcorp2j.mail.yandex.net (mxbackcorp2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::119]) by forwardcorp1p.mail.yandex.net (Yandex) with ESMTP id 451B02E146A; Sun, 9 Jun 2019 14:14:38 +0300 (MSK) Received: from smtpcorp1o.mail.yandex.net (smtpcorp1o.mail.yandex.net [2a02:6b8:0:1a2d::30]) by mxbackcorp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FIM6OTx6EE-EbdGO4lJ; Sun, 09 Jun 2019 14:14:38 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1560078878; bh=fs8nBfb3ds7H31icSADDLPErvh+7dua0F9p+22pSX7g=; h=Message-ID:Date:To:From:Subject:Cc; b=Ct+rZJOX4WGI8YQKjpH3ii9RvoN6KJhvouJJcnmN5Mc2iwej8axIJoD1TZJGtp3Vb S/YLSYJ1q2EjICM7T78VTIjEinHx3v6Tv239k/JhQqVXp4bRzD1QykE7daeGSxxKX3 +dwKLLlKXPP6BKx7wJuCja8D2+NjPVrIKPnVGXZ4= Authentication-Results: mxbackcorp2j.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from dynamic-red.dhcp.yndx.net (dynamic-red.dhcp.yndx.net [2a02:6b8:0:40c:3d25:9e27:4f75:a150]) by smtpcorp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rLRpdRuFBw-EbYSeoAF; Sun, 09 Jun 2019 14:14:37 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: [PATCH] block: document iostat changes for disk busy time accounting From: Konstantin Khlebnikov To: linux-block@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org Cc: Alan Jenkins , Jonathan Corbet , Mikulas Patocka , Mike Snitzer , linux-doc@vger.kernel.org Date: Sun, 09 Jun 2019 14:14:36 +0300 Message-ID: <156007887680.2438.10285329550436435242.stgit@buzz> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 5b18b5a73760 ("block: delete part_round_stats and switch to less precise counting") io_ticks is approximated by adding one at each start and end of requests if jiffies has changed. This works perfectly for requests shorter than a jiffy. If requests runs more than 2 jiffies some I/O time will not be accounted unless there are other reuqests. Fixes: 5b18b5a73760 ("block: delete part_round_stats and switch to less precise counting") Signed-off-by: Konstantin Khlebnikov Links: https://lore.kernel.org/lkml/155413438824.3201.15254568091182734151.stgit@buzz/ --- Documentation/iostats.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt index 49df45f90e8a..5d63b18bd6d1 100644 --- a/Documentation/iostats.txt +++ b/Documentation/iostats.txt @@ -97,6 +97,10 @@ Field 9 -- # of I/Os currently in progress Field 10 -- # of milliseconds spent doing I/Os This field increases so long as field 9 is nonzero. + Since 5.0 this field counts jiffies when at least one request was + started or completed. If request runs more than 2 jiffies then some + I/O time will not be accounted unless there are other requests. + Field 11 -- weighted # of milliseconds spent doing I/Os This field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress