Skip to content

Commit

Permalink
svcrdma: Reduce max_send_sges
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Oct 29, 2018
1 parent 0ac203c commit f3c1fd0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)

/* Qualify the transport resource defaults with the
* capabilities of this particular device */
newxprt->sc_max_send_sges = dev->attrs.max_send_sge;
/* transport hdr, head iovec, one page list entry, tail iovec */
if (newxprt->sc_max_send_sges < 4) {
pr_err("svcrdma: too few Send SGEs available (%d)\n",
/* Transport header, head iovec, tail iovec */
newxprt->sc_max_send_sges = 3;
/* Add one SGE per page list entry */
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);
goto errout;
}
Expand Down

0 comments on commit f3c1fd0

Please sign in to comment.