aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2018-10-01 14:15:56 -0400
committerJ. Bruce Fields <bfields@redhat.com>2018-10-29 16:58:04 -0400
commitf3c1fd0ee294abd4367dfa72d89f016c682202f0 (patch)
treef4f92bd70943be35eb21aefd9fb9c6b2dabd71b7
parent0ac203cb1f03734606c0674eded43aaefb5a491a (diff)
svcrdma: Reduce max_send_sges
There's no need to request a large number of send SGEs because the inline threshold already constrains the number of SGEs per Send. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_transport.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 2848cafd4a17..2f7ec8912f49 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -475,10 +475,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
475 475
476 /* Qualify the transport resource defaults with the 476 /* Qualify the transport resource defaults with the
477 * capabilities of this particular device */ 477 * capabilities of this particular device */
478 newxprt->sc_max_send_sges = dev->attrs.max_send_sge; 478 /* Transport header, head iovec, tail iovec */
479 /* transport hdr, head iovec, one page list entry, tail iovec */ 479 newxprt->sc_max_send_sges = 3;
480 if (newxprt->sc_max_send_sges < 4) { 480 /* Add one SGE per page list entry */
481 pr_err("svcrdma: too few Send SGEs available (%d)\n", 481 newxprt->sc_max_send_sges += svcrdma_max_req_size / PAGE_SIZE;
482 if (newxprt->sc_max_send_sges > dev->attrs.max_send_sge) {
483 pr_err("svcrdma: too few Send SGEs available (%d needed)\n",
482 newxprt->sc_max_send_sges); 484 newxprt->sc_max_send_sges);
483 goto errout; 485 goto errout;
484 } 486 }