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>
Showing
- block/bio.c 21 additions, 3 deletionsblock/bio.c
- block/blk-core.c 4 additions, 58 deletionsblock/blk-core.c
- block/blk-merge.c 0 additions, 1 deletionblock/blk-merge.c
- block/genhd.c 0 additions, 3 deletionsblock/genhd.c
- block/partition-generic.c 0 additions, 3 deletionsblock/partition-generic.c
- include/linux/genhd.h 1 addition, 2 deletionsinclude/linux/genhd.h
Loading
Please register or sign in to comment