[lustre-devel] [PATCH 16/19] lustre: llite: Do not count tiny write twice

James Simmons jsimmons at infradead.org
Sun Nov 28 15:27:51 PST 2021


From: Patrick Farrell <pfarrell at whamcloud.com>

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 <pfarrell at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45476
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa at amazon.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 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);
 	}
 
-- 
1.8.3.1



More information about the lustre-devel mailing list