diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2018-10-12 19:08:41 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-25 11:17:39 -0600 |
commit | d2e428e49eec9b7ff175d7d5941d50e5a7d15324 (patch) | |
tree | db4d6cfeae616a0f133ce78f5067933b0232ccce /drivers/scsi/scsi_logging.c | |
parent | 7f9d35d24c56576a8c18a8b6f74711c7f3c9c6c0 (diff) |
scsi: sd_zbc: Reduce boot device scan and revalidate time
Handling checks of ZBC device capacity using the max_lba field of the
REPORT ZONES command reply for disks with rc_basis == 0 can be done
using the same report zones command reply used to check the "same"
field.
Avoid executing a report zones command solely to check the disk capacity
by merging sd_zbc_check_capacity() into sd_zbc_check_zone_size() and
renaming that function to sd_zbc_check_zones(). This removes a costly
execution of a full report zones command and so reduces device scan
duration at boot time as well as the duration of disk revalidate calls.
Furthermore, setting the partial report bit in the REPORT ZONES command
cdb can significantly reduce this command execution time as the device
does not have to count and report the total number of zones that could
be reported assuming a large enough reply buffer. A non-partial zone
report is necessary only for the first execution of report zones used to
check the same field value (to ensure that this value applies to all
zones of the disk). All other calls to sd_zbc_report_zones() can use a
partial report to reduce execution time.
Using a 14 TB ZBC disk, these simple changes reduce device scan time at
boot from about 3.5s down to about 900ms. Disk revalidate times are also
reduced from about 450ms down to 230ms.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/scsi_logging.c')
0 files changed, 0 insertions, 0 deletions