]> git.baikalelectronics.ru Git - kernel.git/commit
dm zoned: reduce overhead of backing device checks
authorDmitry Fomichev <dmitry.fomichev@wdc.com>
Wed, 6 Nov 2019 22:34:35 +0000 (14:34 -0800)
committerMike Snitzer <snitzer@redhat.com>
Thu, 7 Nov 2019 15:08:36 +0000 (10:08 -0500)
commit115811e9a534437a0595e363e36e62a3f2ac6786
tree46aa9d420dd63b0767cab11267db4a56b99435c0
parentef5ac4f796576054868ddf39d1c148d06d5a6cb2
dm zoned: reduce overhead of backing device checks

Commit a6c9ea7af2b11a added backing device health checks and as a part
of these checks, check_events() block ops template call is invoked in
dm-zoned mapping path as well as in reclaim and flush path. Calling
check_events() with ATA or SCSI backing devices introduces a blocking
scsi_test_unit_ready() call being made in sd_check_events(). Even though
the overhead of calling scsi_test_unit_ready() is small for ATA zoned
devices, it is much larger for SCSI and it affects performance in a very
negative way.

Fix this performance regression by executing check_events() only in case
of any I/O errors. The function dmz_bdev_is_dying() is modified to call
only blk_queue_dying(), while calls to check_events() are made in a new
helper function, dmz_check_bdev().

Reported-by: zhangxiaoxu <zhangxiaoxu5@huawei.com>
Fixes: a6c9ea7af2b11a ("dm zoned: properly handle backing device failure")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-zoned-metadata.c
drivers/md/dm-zoned-reclaim.c
drivers/md/dm-zoned-target.c
drivers/md/dm-zoned.h