]> git.baikalelectronics.ru Git - kernel.git/commit
block: inherit request start time from bio for BLK_CGROUP
authorJens Axboe <axboe@kernel.dk>
Tue, 5 Oct 2021 15:23:59 +0000 (09:23 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 12:17:03 +0000 (06:17 -0600)
commit916b2926f0ecf269d79b1b42a73edbd24c2253be
tree6bbd7e9c8b99456d8d993b38aacbc2e07129e6dd
parentb5a0ad61ba6ed698f95e9441bbcff14b9616fe47
block: inherit request start time from bio for BLK_CGROUP

Doing high IOPS testing with blk-cgroups enabled spends ~15-20% of the
time just doing ktime_get_ns() -> readtsc. We essentially read and
set the start time twice, one for the bio and then again when that bio
is mapped to a request.

Given that the time between the two is very short, inherit the bio
start time instead of reading it again. This cuts 1/3rd of the overhead
of the time keeping.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c