From patchwork Sun Nov 28 23:27:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 12643237 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84922C433F5 for ; Sun, 28 Nov 2021 23:28:09 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 3EC8E201125; Sun, 28 Nov 2021 15:28:06 -0800 (PST) Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 36E71200EC0 for ; Sun, 28 Nov 2021 15:28:03 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id BAD4B268; Sun, 28 Nov 2021 18:27:56 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id B987EC1AC9; Sun, 28 Nov 2021 18:27:56 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Sun, 28 Nov 2021 18:27:51 -0500 Message-Id: <1638142074-5945-17-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638142074-5945-1-git-send-email-jsimmons@infradead.org> References: <1638142074-5945-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 16/19] lustre: llite: Do not count tiny write twice X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Patrick Farrell We accidentally count bytes written with tiny write twice in stats. Remove the extra count. This also has the positive effect of improving tiny write performance by about 4% by removing an extra call to the stats code (the main cost is ktime_get()). Before, 8 byte dd: 13.9 MiB/s After: 14.3 MiB/s WC-bug-id: https://jira.whamcloud.com/browse/LU-15197 Lustre-commit: 5208135f432a320e9 ("LU-15197 llite: Do not count tiny write twice") Signed-off-by: Patrick Farrell Reviewed-on: https://review.whamcloud.com/45476 Reviewed-by: Andreas Dilger Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/llite/file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c index 6755671..d3374232 100644 --- a/fs/lustre/llite/file.c +++ b/fs/lustre/llite/file.c @@ -2032,8 +2032,6 @@ static ssize_t ll_do_tiny_write(struct kiocb *iocb, struct iov_iter *iter) if (result > 0) { ll_heat_add(inode, CIT_WRITE, result); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_WRITE_BYTES, - result); set_bit(LLIF_DATA_MODIFIED, &ll_i2info(inode)->lli_flags); }