Commit f1381ec5 authored by Chunguang Xu's avatar Chunguang Xu Committed by Zheng Zengkai
Browse files

block: fix the problem of io_ticks becoming smaller

mainline inclusion
from mainline-v5.14-rc1
commit d80c228d
category: bugfix
bugzilla: 187475, https://gitee.com/openeuler/kernel/issues/I5ME0J
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d80c228d44640f0b47b57a2ca4afa26ef87e16b0



--------------------------------

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: default avatarChunguang Xu <brookxu@tencent.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/1625521646-1069-1-git-send-email-brookxu.cn@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>

conflict:
	block/blk-core.c

Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 7e352987
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment