From 5208135f432a320e92dacd21e64dd4900fe9858e Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Sun, 7 Nov 2021 17:04:40 -0500 Subject: [PATCH] LU-15197 llite: Do not count tiny write twice 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 Test-parameters: trivial Signed-off-by: Patrick Farrell Change-Id: Ia11e7f16e3e3d0c4012f87cde817ad7b21128fa8 Reviewed-on: https://review.whamcloud.com/45476 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin --- lustre/llite/file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index fa45c70..8903c2d 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -2021,8 +2021,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