Re: WRITE_SAME aio support

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

 



Since you are willing to test,  can you test this patch?
This patch adds support for WRITESAME10/16 to the bs_aio backend.

It passes my tests for WRITESAME :
./bin/iscsi-test-cu iscsi://127.0.0.1/iqn.ronnie.test/1 --test
SCSI.WriteSame*.* -V --dataloss
(well one test fails but it fails for bs_rdwr too)


Dont build against TGTD HEAD, it is broken for aio.
Build against 1.0.38


On Sun, Aug 18, 2013 at 8:13 PM, Moussa Ba (moussaba)
<moussaba@xxxxxxxxxx> wrote:
> I just switched over to rdwr, might be safer anyway...So, how do I enable COMPAREANDWRITE on rdwr?
>
> Moussa
>
> -----Original Message-----
> From: stgt-owner@xxxxxxxxxxxxxxx [mailto:stgt-owner@xxxxxxxxxxxxxxx] On Behalf Of ronnie sahlberg
> Sent: Sunday, August 18, 2013 8:12 PM
> To: Moussa Ba (moussaba)
> Cc: stgt@xxxxxxxxxxxxxxx
> Subject: Re: WRITE_SAME aio support
>
> COMPAREANDWRITE needs to be ported to bs_aio too, but porting it and
> WRITESAME too to bs_aio should be straightforward.
> I can do a patch for that perhaps over the next few days. Possibly.
>
> Unfortunately, I never use bs_aio myself, I only use bs_rdwr,   and it
> seems that TGTD and bs_aio is completely broken.
> I tried to compile and install it under both ubuntu and fedora right
> now but it just dumps core as soon as
> you start sending any kind of I/O to it.
>
> As I am not familiar with bs_aio  I cant tell how long it will take to
> fix it, or perhaps someone else can help look at it too. But as for
> now, bs_aio is pretty borked :-(
> As soon as bs_aio is fixed  I can port WRITESAME and COMPAREANDWRITE to it.
>
>
>
> On Sun, Aug 18, 2013 at 6:16 PM, Moussa Ba (moussaba)
> <moussaba@xxxxxxxxxx> wrote:
>> I will collect the wireshark and send the data. But based on the available documentation on VAAI, it implements 0x89 (ATS or Compare and Write), 0x83 (XCOPY), 0x93 (WRITE_SAME).
>>
>> How is COMPAREANDWRITE enabled?
>> Is it a stable feature?
>> Is it supported by aio?
>>
>> Moussa
>>
>> -----Original Message-----
>> From: ronnie sahlberg [mailto:ronniesahlberg@xxxxxxxxx]
>> Sent: Sunday, August 18, 2013 5:20 PM
>> To: Moussa Ba (moussaba)
>> Cc: stgt@xxxxxxxxxxxxxxx
>> Subject: Re: WRITE_SAME aio support
>>
>> On Sun, Aug 18, 2013 at 5:08 PM, Moussa Ba (moussaba)
>> <moussaba@xxxxxxxxxx> wrote:
>>> Our device is a high performance PCIe drive.  aio is better.
>>
>> I see.
>> The TGTD LUN, is it a normal LUN or have you activated thin-provisioning for it?
>>
>> Can you compile tgtd from scratch and test?
>> If that is feasible, you can change  usr/sbc.c and remove
>> WRITESAME10/16 completely from tgtd.
>> Towards the end of that file there is a definition of what commands
>> the emulated disk devices support :
>>
>> static struct device_type_template sbc_template = {
>> ...
>>
>> Indices 0x41 and 0x93 refer to the two WRITESAME versions.
>> If you change these two lines :
>> {sbc_rw,}, /* WRITE_SAME10 */
>> ...
>> {sbc_rw,}, /* WRITE_SAME_16 */
>>
>> to instead be
>> {spc_illegal_op,},
>>
>> Then WRITESAME10/16 will be disabled and you shouldnt get those
>> warnings in the logs.
>>
>>
>> I can try adding WRITESAME10/16 support to tgtd sometime in the next few days.
>> Would it be possible for you to test those patches for me ?
>>
>>
>>
>>
>>
>>
>>> Any plans for tgt to support ATS,  full copy and other VAAI primitives?
>>
>> Sure.
>> Do you have a list of which SCSI commands these refer to?
>> I assume COMPAREANDWRITE and XCOPY at least.
>>
>> We have COMPAREANDWRITE in TGTD but it is not enabled by default.
>> Could you collect a wireshark trace and send to me so I can see what
>> the commands VMWARE sends looks like? If so I can give it a try to
>> implement something.
>>
>>
>>
>>>
>>> Moussa
>>>
>>>
>>>
>>> -------- Original message --------
>>> From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
>>> Date: 08/18/2013 17:04 (GMT-08:00)
>>> To: "Moussa Ba (moussaba)" <moussaba@xxxxxxxxxx>
>>> Cc: stgt@xxxxxxxxxxxxxxx
>>> Subject: Re: WRITE_SAME aio support
>>>
>>>
>>> If it is VMWARE then it probably uses WRITESAME10/16 for unmap/discard purposes.
>>>
>>> For now, can you try using bs_rdwr instead of bs_aio ?
>>>
>>>
>>> Longer term I will do a patch for
>>> * add WRITESAME10/16 + unmap support to bs_aio
>>> * make "indicate unmap support based on whether the backend supports it or not"
>>>
>>>
>>>
>>>
>>> On Sun, Aug 18, 2013 at 4:57 PM, Moussa Ba (moussaba)
>>> <moussaba@xxxxxxxxxx> wrote:
>>>> The LUN as seen by VMWare shows WRITE_SAME support.   Not sure what is uses for  discard
>>>>
>>>>
>>>> -------- Original message --------
>>>> From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
>>>> Date: 08/18/2013 16:55 (GMT-08:00)
>>>> To: "Moussa Ba (moussaba)" <moussaba@xxxxxxxxxx>
>>>> Cc: stgt@xxxxxxxxxxxxxxx
>>>> Subject: Re: WRITE_SAME aio support
>>>>
>>>>
>>>> Your initiator uses WS10/16 for unmap/discard ?
>>>> (i.e. you mount the filesystem using -o discard in the guest)
>>>>
>>>> STGT currently offers "I support unmapping using both WS10 and 16". We
>>>> probably should only do this
>>>> for backends that supports these operations,  == bs_rdwr.c and not
>>>> indicate support for the others.
>>>>
>>>>
>>>> What we probably need to do here is to make the support for
>>>> WRITESAME10/16 with unmap support optional
>>>> on whether the backend supports it.
>>>> I can look at adding this once I get some other changes in.
>>>>
>>>>
>>>>
>>>> On Wed, Aug 14, 2013 at 2:41 PM, Moussa Ba (moussaba)
>>>> <moussaba@xxxxxxxxxx> wrote:
>>>>> I am seeing a LOT of WRITE_SAME error messages in the tgt logs. I understand it is not implemented for aio, my question is will this affect array performance . We are using tgt to host datastores for a virtualization workload.
>>>>>
>>>>>
>>>>> tgtd: bs_aio_cmd_submit(211) WRITE_SAME not yet supported for AIO backend
>>>>>
>>>>>
>>>>> Moussa
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe stgt" in
>>>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe stgt" in
>>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe stgt" in
>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe stgt" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: aio_writesame.diff.gz
Description: GNU Zip compressed data


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux