]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix the problem of io_ticks becoming smaller
authorChunguang Xu <brookxu@tencent.com>
Mon, 5 Jul 2021 21:47:26 +0000 (05:47 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Jul 2021 12:43:20 +0000 (06:43 -0600)
commite3097bd8c78dcbcd325f473cfdfdb9ef2c81b5b7
tree1d57ac168504faa0db9558ef92eb0ce62362bdfe
parent9d4c03c300b2dba3eb97a63449e7ee8668f4917d
block: fix the problem of io_ticks becoming smaller

On the IO submission path, blk_account_io_start() may interrupt
the system interruption. When the interruption returns, the value
of part->stamp may have been updated by other cores, so the time
value collected before the interruption may be less than part->
stamp. So when this happens, we should do nothing to make io_ticks
more accurate? For kernels less than 5.0, this may cause io_ticks
to become smaller, which in turn may cause abnormal ioutil values.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/1625521646-1069-1-git-send-email-brookxu.cn@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c