]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "block: inherit request start time from bio for BLK_CGROUP"
authorTejun Heo <tj@kernel.org>
Wed, 27 Apr 2022 19:49:12 +0000 (09:49 -1000)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 Apr 2022 19:51:28 +0000 (13:51 -0600)
commitdb2ca6b0ab2ef23e08fb3c4d1056a1eb8154252b
tree4cd48b87f9ee474a66de078d79d2bc1bc5625443
parent06c458c012476eed4654c4a94ef288967e02ae5c
Revert "block: inherit request start time from bio for BLK_CGROUP"

This reverts commit 916b2926f0ecf269d79b1b42a73edbd24c2253be. It has a
couple problems:

* bio_issue_time() is stored in bio->bi_issue truncated to 51 bits. This
  overflows in slightly over 26 days. Setting rq->io_start_time_ns with it
  means that io duration calculation would yield >26days after 26 days of
  uptime. This, for example, confuses kyber making it cause high IO
  latencies.

* rq->io_start_time_ns should record the time that the IO is issued to the
  device so that on-device latency can be measured. However,
  bio_issue_time() is set before the bio goes through the rq-qos controllers
  (wbt, iolatency, iocost), so when the bio gets throttled in any of the
  mechanisms, the measured latencies make no sense - on-device latencies end
  up higher than request-alloc-to-completion latencies.

We'll need a smarter way to avoid calling ktime_get_ns() repeatedly
back-to-back. For now, let's revert the commit.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org # v5.16+
Link: https://lore.kernel.org/r/YmmeOLfo5lzc+8yI@slm.duckdns.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c