Commit f3c1fd0e authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

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: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 0ac203cb
...@@ -475,10 +475,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) ...@@ -475,10 +475,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
/* Qualify the transport resource defaults with the /* Qualify the transport resource defaults with the
* capabilities of this particular device */ * capabilities of this particular device */
newxprt->sc_max_send_sges = dev->attrs.max_send_sge; /* Transport header, head iovec, tail iovec */
/* transport hdr, head iovec, one page list entry, tail iovec */ newxprt->sc_max_send_sges = 3;
if (newxprt->sc_max_send_sges < 4) { /* Add one SGE per page list entry */
pr_err("svcrdma: too few Send SGEs available (%d)\n", newxprt->sc_max_send_sges += svcrdma_max_req_size / PAGE_SIZE;
if (newxprt->sc_max_send_sges > dev->attrs.max_send_sge) {
pr_err("svcrdma: too few Send SGEs available (%d needed)\n",
newxprt->sc_max_send_sges); newxprt->sc_max_send_sges);
goto errout; goto errout;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment