Re: [PATCH 2/2] block: Split and submit bios in LBA order

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

 



On 3/21/23 11:17, Ming Lei wrote:
> On Tue, Mar 21, 2023 at 10:46:30AM +0900, Damien Le Moal wrote:
>> On 3/21/23 09:44, Ming Lei wrote:
>>> On Mon, Mar 20, 2023 at 04:32:57PM -0700, Bart Van Assche wrote:
>>>> On 3/20/23 16:28, Ming Lei wrote:
>>>>> On Fri, Mar 17, 2023 at 04:45:46PM -0700, Bart Van Assche wrote:
>>>>>> Thanks for having taken a look. This patch series is intended for
>>>>>> REQ_OP_WRITE requests and not for REQ_OP_ZONE_APPEND requests.
>>>>>
>>>>> But you are talking about host-managed zoned device, and the write
>>>>> should have to be zone append, right?
>>>>
>>>> Hi Ming,
>>>>
>>>> The use case I'm looking at is Android devices with UFS storage. UFS is
>>>> based on SCSI and hence only REQ_OP_WRITE is supported natively. There is a
>>>> REQ_OP_ZONE_APPEND emulation in drivers/scsi/sd_zbc.c but it restricts the
>>>> queue depth to one.
>>>
>>> But is this UFS one host-managed zoned device? If yes, this "REQ_OP_WRITE"
>>> still should have been handled as REQ_OP_ZONE_APPEND? Otherwise, I don't
>>> think it is host-managed, and your patch isn't needed too.
>>
>> Ming,
>>
>> Both regular writes and zone append writes are supported by host managed
>> devices. For ZNS, zone append write is natively supported as a different
>> command. For SCSI & ATA (and UFS) devices, zone append write is emulated in the
>> sd driver using the regular write command because the SCSI and ATA standards do
>> not define a zone append write command.
> 
> Thanks for the clarification.
> 
>>
>> For BIO splitting, splitting a regular write is fine as the resulting fragments
>> are sequential writes, so all fine. But zone append splitting is not allowed as
> 
> The current bio split code may not make sequential write requests, and
> looks Bart is trying to address it. Then looks scsi zdc emulation still
> requires sequential writes aiming to same zone.

Split does create sequential writes, always, but the processing order may not be
sequential in case of plugging. However, writes to sequential zones are never
plugs so reordering due to plugging does not affect zoned devices.

> 
> But I guess it is hard to maintain bio order, especially md/dm is
> involved.

It is not that hard once you get rid of plugging, which we did. So far, with
everything we support, we are not detecting any issues and we test weekly, every rc.

> 
> Thanks, 
> Ming
> 

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux