summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2020-03-25 16:07:08 +0300
committerJens Axboe <axboe@kernel.dk>2020-03-25 08:49:12 -0600
commit8cd5b8fc00716fb71f6b32d594b38a8f286d6c20 (patch)
treeec3faf2ab2c492b620cbae8cdfd040776b2a47f3 /block/blk-core.c
parentea18e0f0a63af9064db3d4065d90fa743ae0991b (diff)
downloadlinux-riscv-8cd5b8fc00716fb71f6b32d594b38a8f286d6c20.tar.gz
linux-riscv-8cd5b8fc00716fb71f6b32d594b38a8f286d6c20.tar.bz2
linux-riscv-8cd5b8fc00716fb71f6b32d594b38a8f286d6c20.zip
block/diskstats: replace time_in_queue with sum of request times
Column "time_in_queue" in diskstats is supposed to show total waiting time of all requests. I.e. value should be equal to the sum of times from other columns. But this is not true, because column "time_in_queue" is counted separately in jiffies rather than in nanoseconds as other times. This patch removes redundant counter for "time_in_queue" and shows total time of read, write, discard and flush requests. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 4401b30a1751..eaf6cb3887e6 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1340,7 +1340,6 @@ void blk_account_io_done(struct request *req, u64 now)
update_io_ticks(part, jiffies, true);
part_stat_inc(part, ios[sgrp]);
part_stat_add(part, nsecs[sgrp], now - req->start_time_ns);
- part_stat_add(part, time_in_queue, nsecs_to_jiffies64(now - req->start_time_ns));
part_dec_in_flight(req->q, part, rq_data_dir(req));
hd_struct_put(part);