summaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-12-06 11:41:19 -0500
committerJens Axboe <axboe@kernel.dk>2018-12-10 10:30:37 -0500
commit5b18b5a737600fd20ba2045f320d5926ebbf341a (patch)
treefe35e150bf36785dfe3ed8c845e3b043e56f9f90 /include/linux/genhd.h
parent112f158f66cbe25fd561a5dfe9c3826e06abf757 (diff)
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 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 1677cd2a4c4e..838c2a7a40c5 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -398,8 +398,7 @@ static inline void free_part_info(struct hd_struct *part)
398 kfree(part->info); 398 kfree(part->info);
399} 399}
400 400
401/* block/blk-core.c */ 401void update_io_ticks(struct hd_struct *part, unsigned long now);
402extern void part_round_stats(struct request_queue *q, struct hd_struct *part);
403 402
404/* block/genhd.c */ 403/* block/genhd.c */
405extern void device_add_disk(struct device *parent, struct gendisk *disk, 404extern void device_add_disk(struct device *parent, struct gendisk *disk,