All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org
Subject: RE: [PATCH V6 4/9] svcrdma: Use max_sge_rd for destination read depths
Date: Fri, 24 Jul 2015 13:51:34 -0500	[thread overview]
Message-ID: <00d301d0c641$c2fcb6a0$48f623e0$@opengridcomputing.com> (raw)
In-Reply-To: <20150724161837.25617.48584.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>



> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Steve Wise
> Sent: Friday, July 24, 2015 11:19 AM
> To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
> Cc: infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org; sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org; ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org; roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
> eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org; target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org
> Subject: [PATCH V6 4/9] svcrdma: Use max_sge_rd for destination read depths
> 
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
> 
>  include/linux/sunrpc/svc_rdma.h          |    1 +
>  net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   12 +-----------
>  net/sunrpc/xprtrdma/svc_rdma_transport.c |    4 ++++
>  3 files changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
> index cb94ee4..83211bc 100644
> --- a/include/linux/sunrpc/svc_rdma.h
> +++ b/include/linux/sunrpc/svc_rdma.h
> @@ -132,6 +132,7 @@ struct svcxprt_rdma {
>  	struct list_head     sc_accept_q;	/* Conn. waiting accept */
>  	int		     sc_ord;		/* RDMA read limit */
>  	int                  sc_max_sge;
> +	int                  sc_max_sge_rd;	/* max sge for read target */
> 
>  	int                  sc_sq_depth;	/* Depth of SQ */
>  	atomic_t             sc_sq_count;	/* Number of SQ WR on queue */
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> index 2e1348b..cb51742 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> @@ -115,15 +115,6 @@ static void rdma_build_arg_xdr(struct svc_rqst *rqstp,
>  	rqstp->rq_arg.tail[0].iov_len = 0;
>  }
> 
> -static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count)
> -{
> -	if (!rdma_cap_read_multi_sge(xprt->sc_cm_id->device,
> -				     xprt->sc_cm_id->port_num))
> -		return 1;
> -	else
> -		return min_t(int, sge_count, xprt->sc_max_sge);
> -}
> -
>  /* Issue an RDMA_READ using the local lkey to map the data sink */
>  int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
>  			struct svc_rqst *rqstp,
> @@ -144,8 +135,7 @@ int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
> 
>  	ctxt->direction = DMA_FROM_DEVICE;
>  	ctxt->read_hdr = head;
> -	pages_needed =
> -		min_t(int, pages_needed, rdma_read_max_sge(xprt, pages_needed));
> +	pages_needed = min_t(int, pages_needed, xprt->sc_max_sge_rd);
>  	read = min_t(int, pages_needed << PAGE_SHIFT, rs_length);
> 
>  	for (pno = 0; pno < pages_needed; pno++) {
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index 6b36279..fdc850f 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -872,6 +872,8 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>  	 * capabilities of this particular device */
>  	newxprt->sc_max_sge = min((size_t)devattr.max_sge,
>  				  (size_t)RPCSVC_MAXPAGES);
> +	newxprt->sc_max_sge_rd = min_t(size_t, devattr.max_sge_rd,
> +				       RPCSVC_MAXPAGES);
>  	newxprt->sc_max_requests = min((size_t)devattr.max_qp_wr,
>  				   (size_t)svcrdma_max_requests);
>  	newxprt->sc_sq_depth = RPCRDMA_SQ_DEPTH_MULT * newxprt->sc_max_requests;
> @@ -1046,6 +1048,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>  		"    remote_ip       : %pI4\n"
>  		"    remote_port     : %d\n"
>  		"    max_sge         : %d\n"
> +		"    max_sge_rd      : %d\n"
>  		"    sq_depth        : %d\n"
>  		"    max_requests    : %d\n"
>  		"    ord             : %d\n",
> @@ -1059,6 +1062,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>  		ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id->
>  		       route.addr.dst_addr)->sin_port),
>  		newxprt->sc_max_sge,
> +		newxprt->sc_max_sge_rd,
>  		newxprt->sc_sq_depth,
>  		newxprt->sc_max_requests,
>  		newxprt->sc_ord);
> 

With the above patch change, we have no more users of the recently created rdma_cap_read_multi_sge().  Should I add a patch to remove it?

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: "Steve Wise" <swise@opengridcomputing.com>
To: <dledford@redhat.com>
Cc: <infinipath@intel.com>, <sagig@mellanox.com>,
	<ogerlitz@mellanox.com>, <roid@mellanox.com>,
	<linux-rdma@vger.kernel.org>, <eli@mellanox.com>,
	<target-devel@vger.kernel.org>, <linux-nfs@vger.kernel.org>,
	<bfields@fieldses.org>
Subject: RE: [PATCH V6 4/9] svcrdma: Use max_sge_rd for destination read depths
Date: Fri, 24 Jul 2015 13:51:34 -0500	[thread overview]
Message-ID: <00d301d0c641$c2fcb6a0$48f623e0$@opengridcomputing.com> (raw)
In-Reply-To: <20150724161837.25617.48584.stgit@build2.ogc.int>



> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of Steve Wise
> Sent: Friday, July 24, 2015 11:19 AM
> To: dledford@redhat.com
> Cc: infinipath@intel.com; sagig@mellanox.com; ogerlitz@mellanox.com; roid@mellanox.com; linux-rdma@vger.kernel.org;
> eli@mellanox.com; target-devel@vger.kernel.org; linux-nfs@vger.kernel.org; bfields@fieldses.org
> Subject: [PATCH V6 4/9] svcrdma: Use max_sge_rd for destination read depths
> 
> Signed-off-by: Steve Wise <swise@opengridcomputing.com>
> ---
> 
>  include/linux/sunrpc/svc_rdma.h          |    1 +
>  net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   12 +-----------
>  net/sunrpc/xprtrdma/svc_rdma_transport.c |    4 ++++
>  3 files changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
> index cb94ee4..83211bc 100644
> --- a/include/linux/sunrpc/svc_rdma.h
> +++ b/include/linux/sunrpc/svc_rdma.h
> @@ -132,6 +132,7 @@ struct svcxprt_rdma {
>  	struct list_head     sc_accept_q;	/* Conn. waiting accept */
>  	int		     sc_ord;		/* RDMA read limit */
>  	int                  sc_max_sge;
> +	int                  sc_max_sge_rd;	/* max sge for read target */
> 
>  	int                  sc_sq_depth;	/* Depth of SQ */
>  	atomic_t             sc_sq_count;	/* Number of SQ WR on queue */
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> index 2e1348b..cb51742 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> @@ -115,15 +115,6 @@ static void rdma_build_arg_xdr(struct svc_rqst *rqstp,
>  	rqstp->rq_arg.tail[0].iov_len = 0;
>  }
> 
> -static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count)
> -{
> -	if (!rdma_cap_read_multi_sge(xprt->sc_cm_id->device,
> -				     xprt->sc_cm_id->port_num))
> -		return 1;
> -	else
> -		return min_t(int, sge_count, xprt->sc_max_sge);
> -}
> -
>  /* Issue an RDMA_READ using the local lkey to map the data sink */
>  int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
>  			struct svc_rqst *rqstp,
> @@ -144,8 +135,7 @@ int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
> 
>  	ctxt->direction = DMA_FROM_DEVICE;
>  	ctxt->read_hdr = head;
> -	pages_needed =
> -		min_t(int, pages_needed, rdma_read_max_sge(xprt, pages_needed));
> +	pages_needed = min_t(int, pages_needed, xprt->sc_max_sge_rd);
>  	read = min_t(int, pages_needed << PAGE_SHIFT, rs_length);
> 
>  	for (pno = 0; pno < pages_needed; pno++) {
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index 6b36279..fdc850f 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -872,6 +872,8 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>  	 * capabilities of this particular device */
>  	newxprt->sc_max_sge = min((size_t)devattr.max_sge,
>  				  (size_t)RPCSVC_MAXPAGES);
> +	newxprt->sc_max_sge_rd = min_t(size_t, devattr.max_sge_rd,
> +				       RPCSVC_MAXPAGES);
>  	newxprt->sc_max_requests = min((size_t)devattr.max_qp_wr,
>  				   (size_t)svcrdma_max_requests);
>  	newxprt->sc_sq_depth = RPCRDMA_SQ_DEPTH_MULT * newxprt->sc_max_requests;
> @@ -1046,6 +1048,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>  		"    remote_ip       : %pI4\n"
>  		"    remote_port     : %d\n"
>  		"    max_sge         : %d\n"
> +		"    max_sge_rd      : %d\n"
>  		"    sq_depth        : %d\n"
>  		"    max_requests    : %d\n"
>  		"    ord             : %d\n",
> @@ -1059,6 +1062,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>  		ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id->
>  		       route.addr.dst_addr)->sin_port),
>  		newxprt->sc_max_sge,
> +		newxprt->sc_max_sge_rd,
>  		newxprt->sc_sq_depth,
>  		newxprt->sc_max_requests,
>  		newxprt->sc_ord);
> 

With the above patch change, we have no more users of the recently created rdma_cap_read_multi_sge().  Should I add a patch to remove it?


  parent reply	other threads:[~2015-07-24 18:51 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 16:18 [PATCH V6 0/9] iSER support for iWARP Steve Wise
2015-07-24 16:18 ` Steve Wise
     [not found] ` <20150724161331.25617.8475.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
2015-07-24 16:18   ` [PATCH V6 1/9] RDMA/iser: Limit sg tablesize and max_sectors to device fastreg max depth Steve Wise
2015-07-24 16:18     ` Steve Wise
     [not found]     ` <20150724161820.25617.63886.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
2015-07-24 16:41       ` Jason Gunthorpe
2015-07-24 16:41         ` Jason Gunthorpe
2015-07-24 18:40         ` Steve Wise
2015-07-24 18:40           ` Steve Wise
2015-07-24 19:14           ` Jason Gunthorpe
2015-07-26  9:58             ` Sagi Grimberg
2015-07-26  9:57           ` Sagi Grimberg
2015-07-26  9:57             ` Sagi Grimberg
2015-07-24 16:18   ` [PATCH V6 2/9] mlx4, mlx5, mthca: Expose max_sge_rd correctly Steve Wise
2015-07-24 16:18     ` Steve Wise
2015-07-24 16:18   ` [PATCH V6 3/9] ipath,qib: " Steve Wise
2015-07-24 16:18     ` Steve Wise
2015-07-24 16:18   ` [PATCH V6 4/9] svcrdma: Use max_sge_rd for destination read depths Steve Wise
2015-07-24 16:18     ` Steve Wise
     [not found]     ` <20150724161837.25617.48584.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
2015-07-24 18:51       ` Steve Wise [this message]
2015-07-24 18:51         ` Steve Wise
2015-07-26  9:58         ` Sagi Grimberg
     [not found]           ` <55B4AF63.3040108-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-26 10:42             ` Christoph Hellwig
2015-07-26 10:42               ` Christoph Hellwig
2015-07-24 16:18   ` [PATCH V6 6/9] isert: Rename IO functions to more descriptive names Steve Wise
2015-07-24 16:18     ` Steve Wise
     [not found]     ` <20150724161848.25617.26092.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
2015-07-26 10:08       ` Sagi Grimberg
2015-07-26 10:08         ` Sagi Grimberg
     [not found]         ` <55B4B190.7070305-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-26 10:43           ` Christoph Hellwig
2015-07-26 10:43             ` Christoph Hellwig
     [not found]             ` <20150726104328.GB18944-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-07-26 11:00               ` Sagi Grimberg
2015-07-26 11:00                 ` Sagi Grimberg
2015-07-26 15:53                 ` Christoph Hellwig
2015-07-26 16:44                   ` Sagi Grimberg
     [not found]                 ` <55B4BDE3.8040801-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-26 17:32                   ` Steve Wise
2015-07-26 17:32                     ` Steve Wise
2015-07-26 17:40                     ` Sagi Grimberg
     [not found]                       ` <55B51B7A.8030008-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-26 20:15                         ` Steve Wise
2015-07-26 20:15                           ` Steve Wise
2015-07-26 20:17           ` Steve Wise
2015-07-26 20:17             ` Steve Wise
     [not found]             ` <55B5404F.5040404-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2015-07-27 21:45               ` Steve Wise
2015-07-27 21:45                 ` Steve Wise
2015-08-03 19:32               ` Steve Wise
2015-08-03 19:32                 ` Steve Wise
2015-08-04 17:26                 ` Sagi Grimberg
     [not found]                   ` <55C0F5B7.4040100-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-08-04 17:44                     ` Steve Wise
2015-08-04 17:44                       ` Steve Wise
2015-08-05 21:23                   ` Steve Wise
2015-08-05 21:23                     ` Steve Wise
2015-08-06 15:37                     ` Sagi Grimberg
2015-08-06 15:37                       ` Sagi Grimberg
     [not found]                       ` <55C37F43.6080106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-08-12 22:15                         ` Steve Wise
2015-08-12 22:15                           ` Steve Wise
2015-08-13 13:09                           ` Sagi Grimberg
2015-07-24 16:18 ` [PATCH V6 5/9] RDMA/isert: Limit read depth based on the device max_sge_rd capability Steve Wise
2015-07-24 16:18 ` [PATCH V6 7/9] isert: Use the device's max fastreg page list depth Steve Wise
2015-07-24 16:18 ` [PATCH V6 8/9] isert: Use local_dma_lkey whenever possible Steve Wise
     [not found]   ` <20150724161859.25617.17286.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
2015-07-24 16:49     ` Jason Gunthorpe
2015-07-24 16:49       ` Jason Gunthorpe
     [not found]       ` <20150724164909.GB25480-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-24 18:41         ` Steve Wise
2015-07-24 18:41           ` Steve Wise
2015-07-24 16:19 ` [PATCH V6 9/9] isert: Support iWARP transports using FRMRs Steve Wise
2015-07-24 16:57   ` Jason Gunthorpe
2015-07-24 18:48     ` Steve Wise
2015-07-24 18:48       ` Steve Wise
2015-07-24 19:24       ` Jason Gunthorpe
2015-07-24 19:24         ` Jason Gunthorpe
2015-07-24 19:57         ` Steve Wise
2015-07-24 19:57           ` Steve Wise
2015-07-24 22:11           ` Steve Wise
2015-07-24 22:11             ` Steve Wise
2015-07-24 22:38             ` Jason Gunthorpe
2015-07-24 22:38               ` Jason Gunthorpe
     [not found]         ` <20150724192411.GC26225-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-26 10:23           ` Sagi Grimberg
2015-07-26 10:23             ` Sagi Grimberg
2015-07-27 17:07             ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00d301d0c641$c2fcb6a0$48f623e0$@opengridcomputing.com' \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.