Re: [PATCH] iser-target: stop using frwr for small IOs

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

 



Hey Vu,

On Mon, 2013-11-11 at 19:04 +0200, Vu Pham wrote:
> From: Vu Pham <vu@xxxxxxxxxxxx>
> 
> For small IOs, stop using frwr. DMA mr is sufficient
> 
> Signed-off-by: Vu Pham <vu@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/ulp/isert/ib_isert.c |   32 +++++++++++++++++++-----------
>  1 files changed, 20 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
> index 3591855..6ce4db2 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -2259,18 +2259,26 @@ isert_reg_rdma_frwr(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
>  	data_len = min(data_left, rdma_write_max);
>  	wr->cur_rdma_length = data_len;
>  
> -	spin_lock_irqsave(&isert_conn->conn_lock, flags);
> -	fr_desc = list_first_entry(&isert_conn->conn_frwr_pool,
> -				   struct fast_reg_descriptor, list);
> -	list_del(&fr_desc->list);
> -	spin_unlock_irqrestore(&isert_conn->conn_lock, flags);
> -	wr->fr_desc = fr_desc;
> -
> -	ret = isert_fast_reg_mr(fr_desc, isert_cmd, isert_conn,
> -			  ib_sge, offset, data_len);
> -	if (ret) {
> -		list_add_tail(&fr_desc->list, &isert_conn->conn_frwr_pool);
> -		goto unmap_sg;
> +	/* if there is a single dma entry, dma mr is sufficient */
> +	if (count == 1) {
> +		ib_sge->addr = ib_sg_dma_address(ib_dev, &sg_start[0]);
> +		ib_sge->length = ib_sg_dma_len(ib_dev, &sg_start[0]);
> +		ib_sge->lkey = isert_conn->conn_mr->lkey;
> +		wr->fr_desc = NULL;
> +	} else {
> +		spin_lock_irqsave(&isert_conn->conn_lock, flags);
> +		fr_desc = list_first_entry(&isert_conn->conn_frwr_pool,
> +					   struct fast_reg_descriptor, list);
> +		list_del(&fr_desc->list);
> +		spin_unlock_irqrestore(&isert_conn->conn_lock, flags);
> +		wr->fr_desc = fr_desc;
> +
> +		ret = isert_fast_reg_mr(fr_desc, isert_cmd, isert_conn,
> +				  ib_sge, offset, data_len);
> +		if (ret) {
> +			list_add_tail(&fr_desc->list, &isert_conn->conn_frwr_pool);
> +			goto unmap_sg;
> +		}
>  	}
>  

Just wondering, is not FMR still required for T10 PI regardless for
small IOs here..?

Should this be depending upon if a protection memory region is in use,
or do you plan to send that as a separate patch..?

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux