]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT
authorChuck Lever <chuck.lever@oracle.com>
Sun, 9 Apr 2017 17:05:52 +0000 (13:05 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 25 Apr 2017 21:25:54 +0000 (17:25 -0400)
The Send Queue depth is temporarily reduced to 1 SQE per credit. The
new rdma_rw API does an internal computation, during QP creation, to
increase the depth of the Send Queue to handle RDMA Read and Write
operations.

This change has to come before the NFSD code paths are updated to
use the rdma_rw API. Without this patch, rdma_rw_init_qp() increases
the size of the SQ too much, resulting in memory allocation failures
during QP creation.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma.c
net/sunrpc/xprtrdma/svc_rdma_transport.c

index 002a46d1faa1cc8c8284a09c3b5a356d30b2c8e8..11d5aa123f17b4f936529d1e52c97d14c8c39e3c 100644 (file)
@@ -182,7 +182,6 @@ struct svcxprt_rdma {
 /* The default ORD value is based on two outstanding full-size writes with a
  * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ.  */
 #define RPCRDMA_ORD             (64/4)
-#define RPCRDMA_SQ_DEPTH_MULT   8
 #define RPCRDMA_MAX_REQUESTS    32
 #define RPCRDMA_MAX_REQ_SIZE    4096
 
index c846ca9f1ebaa661f1e4a93893752950d35a4b6a..9124441746470c0d7e8da3d31d68eddead04b8c2 100644 (file)
@@ -247,8 +247,6 @@ int svc_rdma_init(void)
        dprintk("SVCRDMA Module Init, register RPC RDMA transport\n");
        dprintk("\tsvcrdma_ord      : %d\n", svcrdma_ord);
        dprintk("\tmax_requests     : %u\n", svcrdma_max_requests);
-       dprintk("\tsq_depth         : %u\n",
-               svcrdma_max_requests * RPCRDMA_SQ_DEPTH_MULT);
        dprintk("\tmax_bc_requests  : %u\n", svcrdma_max_bc_requests);
        dprintk("\tmax_inline       : %d\n", svcrdma_max_req_size);
 
index fc8f14c7bfec60dc5828340861a747e49f06193e..e1097cc6d1eb3ab29003f0e5e5946637df537898 100644 (file)
@@ -1014,7 +1014,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
                                            svcrdma_max_bc_requests);
        newxprt->sc_rq_depth = newxprt->sc_max_requests +
                               newxprt->sc_max_bc_requests;
-       newxprt->sc_sq_depth = RPCRDMA_SQ_DEPTH_MULT * newxprt->sc_rq_depth;
+       newxprt->sc_sq_depth = newxprt->sc_rq_depth;
        atomic_set(&newxprt->sc_sq_avail, newxprt->sc_sq_depth);
 
        if (!svc_rdma_prealloc_ctxts(newxprt))