Pete Wyckoff wrote:

> [EMAIL PROTECTED] wrote on Mon, 28 Apr 2008 11:20 -0500:
>   
>> Erez Zilber wrote:
>>     
>>>
>>> I understand that IB's requirements are too difficult to force. I guess
>>> that we will do something like:
>>>
>>>     * If the scatterlist is aligned, just use it as is.
>>>     * If some elements at the beginning/end of the scatterlist are
>>>       unaligned, we can copy only them (and use the rest of the
>>>       scatterlist as is). We saw that sometimes (e.g. GFS), only the 1st
>>>       element is unaligned, so copying the whole data is unnecessary.
>>>     * Else, copy the whole scatterlist to buffers that iSER allocates.
>>>       This is what we do today with unaligned buffers.
>>>
>>>       
>> Pete, we are discissing the dma_alignment patch you sent. Above are the dma 
>> restrictions the iser driver has right now. For the 3rd requirement does 
>> that mean we want to set the alignment to be page aligned right?
>>     
>
> Erez's alignment rules leave out one case:  when the sg list
> has only one element, there are no restrictions on start/end
> alignment.
>   

Yeah, this is the trivial case (which is already covered in the iSER code).

> The iser alignment requirements are too complex to express with the
> q->dma_alignment approach.  In iser, as Erez suggests, bouncing can
> be done.  His second (*) would be a nice addition that would
> definitely help some of our apps.
>   

We will try to send a patch for that soon.

> My patch "iscsi iser: remove DMA alignment restriction" changes
> iser to make the alignment 0, rather than the default 512, to avoid
> the bounce buffering in __blk_rq_map_user().

Just to make sure that I understand - "alignment 0 " means that the
block layer doesn't care at all about alignment?

>   Else confirming
> single-element or multi-element sg lists will be bounced
> unnecessarily.  As bouncing already exists in iser, anything that
> the block layer might do is purely duplicative, so it is best to
> turn it off.  This can be done now.
>
> Here it is for reference.  I updated the commentary; hopefully
> it makes sense.  Expect some fuzz as this is against an older
> 2.6.25-rc4.
>
>               -- Pete
>
> commit 47eaf146cde1ddd0a80aa45a1f50514f6a05b928
> Author: Pete Wyckoff <[EMAIL PROTECTED]>
> Date:   Fri May 2 10:31:58 2008 -0400
>
>     iscsi iser: remove block-layer DMA alignment restriction
>     
>     iser has rather complex rules for data alignment that come from
>     its particular use of memory mapping hardware on IB.  iser uses
>     its own bouncing layer to satisfy these requirements.
>     
>     This patch removes the 512-byte DMA alignment requirement that
>     is imposed by default at the block layer.  Without this change,
>     IO from userspace (through sg or bsg, for example) would be
>     bounced at the block layer even if that is not required by iser.
>     
>     Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>
>
> diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c 
> b/drivers/infiniband/ulp/iser/iscsi_iser.c
> index be1b9fb..313f102 100644
> --- a/drivers/infiniband/ulp/iser/iscsi_iser.c
> +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
> @@ -543,6 +543,12 @@ iscsi_iser_ep_disconnect(__u64 ep_handle)
>       iser_conn_terminate(ib_conn);
>  }
>  
> +static int iscsi_iser_slave_configure(struct scsi_device *sdev)
> +{
> +     blk_queue_dma_alignment(sdev->request_queue, 0);
> +     return 0;
> +}
> +
>  static struct scsi_host_template iscsi_iser_sht = {
>       .module                 = THIS_MODULE,
>       .name                   = "iSCSI Initiator over iSER, v." DRV_VER,
> @@ -556,6 +562,7 @@ static struct scsi_host_template iscsi_iser_sht = {
>       .eh_device_reset_handler= iscsi_eh_device_reset,
>       .eh_host_reset_handler  = iscsi_eh_host_reset,
>       .use_clustering         = DISABLE_CLUSTERING,
> +     .slave_configure        = iscsi_iser_slave_configure,
>       .proc_name              = "iscsi_iser",
>       .this_id                = -1,
>  };
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to