From patchwork Tue Aug 18 22:26:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Liu X-Patchwork-Id: 11722245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 848651575 for ; Tue, 18 Aug 2020 22:27:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BF67207BB for ; Tue, 18 Aug 2020 22:27:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="jegP3tYd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726845AbgHRW1D (ORCPT ); Tue, 18 Aug 2020 18:27:03 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:28516 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgHRW1D (ORCPT ); Tue, 18 Aug 2020 18:27:03 -0400 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07IMGWbZ018823 for ; Tue, 18 Aug 2020 15:27:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=facebook; bh=mDwExpppelWwEhObLUpHdWuu5whhjC8BnC8yJ4+f9go=; b=jegP3tYd3vGf0Z1oCN62w6/2gRHKMdql0B3WuUnUM+cJNUmHow/KF6gSvdDe/0M9jBtD H3phxyWzgPm3ZFx/zFyxhcXyVWgXiAT2xY+DTGL0inrxXFeDFK3WMDHzkT75yO0q36TQ /MFgQgrkeY9ViuIluBSB9+JMVu0YZv/WWb8= Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com with ESMTP id 3304prnemx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 18 Aug 2020 15:27:02 -0700 Received: from intmgw002.08.frc2.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c085:21d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 18 Aug 2020 15:27:01 -0700 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id CE4BE62E4B8C; Tue, 18 Aug 2020 15:26:57 -0700 (PDT) Smtp-Origin-Hostprefix: devbig From: Song Liu Smtp-Origin-Hostname: devbig006.ftw2.facebook.com To: , , CC: , , , , , Song Liu Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH v2 0/3] block: improve iostat for md/bcache partitions Date: Tue, 18 Aug 2020 15:26:42 -0700 Message-ID: <20200818222645.952219-1-songliubraving@fb.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-18_16:2020-08-18,2020-08-18 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 adultscore=0 spamscore=0 impostorscore=0 suspectscore=0 clxscore=1015 mlxlogscore=541 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008180160 X-FB-Internal: deliver Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Currently, devices like md, bcache uses disk_[start|end]_io_acct to report iostat. These functions couldn't get proper iostat for partitions on these devices. This set resolves this issue by introducing part_[begin|end]_io_acct, and using them in md and bcache code. Changes v1 => v2: 1. Refactor the code, as suggested by Christoph. 2. Include Coly's Reviewed-by tag. Song Liu (3): block: introduce part_[begin|end]_io_acct md: use part_[begin|end]_io_acct instead of disk_[begin|end]_io_acct bcache: use part_[begin|end]_io_acct instead of disk_[begin|end]_io_acct block/blk-core.c | 39 +++++++++++++++++++++++++++++++------ drivers/md/bcache/request.c | 10 ++++++---- drivers/md/md.c | 8 ++++---- include/linux/blkdev.h | 5 +++++ 4 files changed, 48 insertions(+), 14 deletions(-) --- 2.24.1