Re: [PATCH v3 02/11] scsi: sd_zbc: Reduce boot device scan and revalidate time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/12/2018 09:33 AM, Hannes Reinecke wrote:
> On 10/12/18 4:30 AM, Damien Le Moal wrote:
>> 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.
>>
>> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
>> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
>> ---
>>   drivers/scsi/sd_zbc.c | 94 ++++++++++++++++++-------------------------
>>   1 file changed, 40 insertions(+), 54 deletions(-)
>>
> Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>
>
> ... and it'll be your fault if there are drives which do not support 
> the 'partial' bit :)
>

I already look forward the quirk list ;)

> Cheers,
>
> Hannes





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux