OSDN Git Service

svcrdma: Estimate Send Queue depth properly
authorChuck Lever <chuck.lever@oracle.com>
Mon, 28 Aug 2017 19:06:22 +0000 (15:06 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 5 Sep 2017 19:15:31 +0000 (15:15 -0400)
commit26fb2254dd33b02a522fac42745693f5969b7d4b
treed1d9fd4b08b7b87465d9bebebd013b960739318b
parent0062818298662d0d05061949d12880146b5ebd65
svcrdma: Estimate Send Queue depth properly

The rdma_rw API adjusts max_send_wr upwards during the
rdma_create_qp() call. If the ULP actually wants to take advantage
of these extra resources, it must increase the size of its send
completion queue (created before rdma_create_qp is called) and
increase its send queue accounting limit.

Use the new rdma_rw_mr_factor API to figure out the correct value
to use for the Send Queue and Send Completion Queue depths.

And, ensure that the chosen Send Queue depth for a newly created
transport does not overrun the QP WR limit of the underlying device.

Lastly, there's no longer a need to carry the Send Queue depth in
struct svcxprt_rdma, since the value is used only in the
svc_rdma_accept() path.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c