From patchwork Fri Apr 26 00:20:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 10917857 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 06C5A912 for ; Fri, 26 Apr 2019 00:21:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E23C028D30 for ; Fri, 26 Apr 2019 00:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D662228CF2; Fri, 26 Apr 2019 00:21:14 +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,FREEMAIL_FROM,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 61AE928D12 for ; Fri, 26 Apr 2019 00:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727100AbfDZAVM (ORCPT ); Thu, 25 Apr 2019 20:21:12 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:35695 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbfDZAVM (ORCPT ); Thu, 25 Apr 2019 20:21:12 -0400 Received: by mail-yw1-f68.google.com with SMTP id d132so585293ywa.2 for ; Thu, 25 Apr 2019 17:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ztWRd3wHw2jMAG4RUdsq7Ojt2d2mraX7SmXYPZ/MnB0=; b=T/PIB/8Lc6vYgzuQJ8WyhCqUybuwJcntoclecPqwSVy8vdtmcJ46V3R12gLPxntX5m oKUIhY0b7xMXR3qSo+XLUsPMjKu1h3YkNo3dCArXU4PgqKmLs5rqxVq12LSEM+3oqdc9 AdafnSp4DwfEhJASOFe7K4vSRMr2xewWB2igOw9Vm7x2kMvYNk6ACg+bALaruANzw2E4 DIXFfBZvMtVoqRF+1n3ADC9Bz/i8/CajTj2dLbhUxCZa08X+qkD4n5wxPq2a1Jq6Tol7 9D5/iJH8Wkd16mFn6h61KsUqGZeab7U8PhQSagqFsxABSBooNHrYH3WDKk0DAiHEgHvK 98ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ztWRd3wHw2jMAG4RUdsq7Ojt2d2mraX7SmXYPZ/MnB0=; b=lh+JAsOr+JPHwl5UozwDBw21Dr7x7qmiRllhmhtE+Rum6dUvl+UWTo2EE8h3YC1mJe z9xCGUsxeLHqdaGbPsDZzpf9eZ8icIIj8V4GMPCWYRlRpw5nc21NuPp05VU04+2mJOdR /BEkgs94le+1az+3AqLutSOnpyukBmzcKIK9gQqER5SDcyibsnJm4TRn6oJ/87taS2nz rnGJsE9CrgK59DSyff0wTgyeVKUKU57ejBH6Zn8dSoC6hknpFzj1mPglNTjSDYBj4tGO bCh84rgn7D9g87sViYdcrDGePLwsNWeMKAlfHW3qkh7qqJwUUI7M+pbNVj1uPxkQzvRi wtVg== X-Gm-Message-State: APjAAAVuehbifw+3x4Pbjv80+vkoK1tiSKptACrwJ7FmRrAvxrgJWKtx OpdQ9WospmgwkIl6Hl1pUtfEelZc X-Google-Smtp-Source: APXvYqwIMFmebQ8NgHU5D8xfOh65Ce6Wh40gKZvxSso7E5ae1LXLTq7PqNiRYhTKYfQZGHeklfBsQA== X-Received: by 2002:a0d:eacf:: with SMTP id t198mr12637378ywe.495.1556238071015; Thu, 25 Apr 2019 17:21:11 -0700 (PDT) Received: from localhost ([2620:10d:c091:180::5484]) by smtp.gmail.com with ESMTPSA id 191sm8242546ywg.12.2019.04.25.17.21.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 17:21:09 -0700 (PDT) From: Jes Sorensen X-Google-Original-From: Jes Sorensen To: linux-block@vger.kernel.org Cc: josef@toxicpanda.com, kernel-team@fb.com Subject: [PATCH 0/5] RFC blk-mq device stats Date: Thu, 25 Apr 2019 20:20:45 -0400 Message-Id: <20190426002050.15499-1-Jes.Sorensen@gmail.com> X-Mailer: git-send-email 2.20.1 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 From: Jes Sorensen Hi, This patchset adds per-device histogram statistics of read, write, and discard request sizes, as well as number of requests for each bucket. It uses the blk-stat infrastructure and only collects stats for devices for which it has been explicitly enabled by writing 1 to /sys/block//queue/histstat In addition it builds on top of two patches I recklessly stole from Josef - thanks! Thoughts or oppinions on this approach? I am not married to the naming, so happy to change that if wanted. Thanks, Jes Jes Sorensen (3): Use blk-stat infrastructure to collect per queue device stats Export block dev stats to sysfs Expand block stats to export number of of requests per bucket Josef Bacik (2): blk-stat: rename batch to time block: keep track of per-device io sizes in stats block/blk-iolatency.c | 2 +- block/blk-mq.c | 56 ++++++++++++++++++++++++++++-- block/blk-stat.c | 16 +++++---- block/blk-stat.h | 3 +- block/blk-sysfs.c | 71 +++++++++++++++++++++++++++++++++++++++ block/blk-throttle.c | 3 +- include/linux/blk_types.h | 3 +- include/linux/blkdev.h | 12 +++++-- 8 files changed, 149 insertions(+), 17 deletions(-)