diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2018-12-06 19:41:19 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-10 18:30:37 +0300 |
commit | 5b18b5a737600fd20ba2045f320d5926ebbf341a (patch) | |
tree | fe35e150bf36785dfe3ed8c845e3b043e56f9f90 /block/blk-merge.c | |
parent | 112f158f66cbe25fd561a5dfe9c3826e06abf757 (diff) | |
download | linux-5b18b5a737600fd20ba2045f320d5926ebbf341a.tar.xz |
block: delete part_round_stats and switch to less precise counting
We want to convert to per-cpu in_flight counters.
The function part_round_stats needs the in_flight counter every jiffy, it
would be too costly to sum all the percpu variables every jiffy, so it
must be deleted. part_round_stats is used to calculate two counters -
time_in_queue and io_ticks.
time_in_queue can be calculated without part_round_stats, by adding the
duration of the I/O when the I/O ends (the value is almost as exact as the
previously calculated value, except that time for in-progress I/Os is not
counted).
io_ticks can be approximated by increasing the value when I/O is started
or ended and the jiffies value has changed. If the I/Os take less than a
jiffy, the value is as exact as the previously calculated value. If the
I/Os take more than a jiffy, io_ticks can drift behind the previously
calculated value.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index a120d59b9705..9da5629d0887 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -689,7 +689,6 @@ static void blk_account_io_merge(struct request *req) part_stat_lock(); part = req->part; - part_round_stats(req->q, part); part_dec_in_flight(req->q, part, rq_data_dir(req)); hd_struct_put(part); |