block: use "precise_iostat" to switch accurate iostat account
hulk inclusion category: bugfix bugzilla: 187044, https://gitee.com/openeuler/kernel/issues/I5F2BY CVE: NA -------------------------------- There is io path like: blk_mq_make_request blk_mq_bio_to_request blk_account_io_start part_round_stats part_in_flight /* controlled by precise_iostat, it also can calculated by atomic accumulation */ blk_mq_in_flight blk_mq_queue_tag_busy_iter bt_for_each blk_mq_find_and_get_req blk_mq_tags_lock_irqsave ... blk_mq_tags_unlock_irqrestore As we can see, there is a unnecessary locking operation in io path which will affect concurrency performance. This problem was introduced by "part_round_stats" and "part_in_flight" which using tag to account inflight. Fix it by using "precise_iostat" too, moving part_round_stats into "precise_iostat", when "precise_iostat" is on, the iostat is accurate and using atomic accumulation to account inflight. when it is off, the io iostat will not be accurate. Signed-off-by: NZhang Wensheng <zhangwensheng5@huawei.com> Reviewed-by: NYu Kuai <yukuai3@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
Showing
想要评论请 注册 或 登录