]> www.infradead.org Git - users/dwmw2/linux.git/commit
block: update io_ticks when io hang
authorZhang Wensheng <zhangwensheng5@huawei.com>
Thu, 17 Feb 2022 06:42:47 +0000 (14:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:35 +0000 (13:57 +0200)
commit3ee3e7021b0656b52e62de903ef17214836afa3d
treee88f82b9f9b1e734f53487f4b6ce9c32926bc6c1
parentfeb9509c2cf4783fd33230620511f59f112269fa
block: update io_ticks when io hang

[ Upstream commit 86d7331299fda7634b11c1b7c911432679d525a5 ]

When the inflight IOs are slow and no new IOs are issued, we expect
iostat could manifest the IO hang problem. However after
commit 5b18b5a73760 ("block: delete part_round_stats and switch to less
precise counting"), io_tick and time_in_queue will not be updated until
the end of IO, and the avgqu-sz and %util columns of iostat will be zero.

Because it has using stat.nsecs accumulation to express time_in_queue
which is not suitable to change, and may %util will express the status
better when io hang occur. To fix io_ticks, we use update_io_ticks and
inflight to update io_ticks when diskstats_show and part_stat_show
been called.

Fixes: 5b18b5a73760 ("block: delete part_round_stats and switch to less precise counting")
Signed-off-by: Zhang Wensheng <zhangwensheng5@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220217064247.4041435-1-zhangwensheng5@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/genhd.c