Whamcloud - gitweb
LU-15197 llite: Do not count tiny write twice 76/45476/3
authorPatrick Farrell <pfarrell@whamcloud.com>
Sun, 7 Nov 2021 22:04:40 +0000 (17:04 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 Nov 2021 06:28:50 +0000 (06:28 +0000)
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
14.3 MiB/s

Test-parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia11e7f16e3e3d0c4012f87cde817ad7b21128fa8
Reviewed-on: https://review.whamcloud.com/45476
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index fa45c70..8903c2d 100644 (file)
@@ -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);