diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2014-05-28 10:32:26 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2014-06-04 08:56:37 -0400 |
commit | 03ff8821eb5ed168792667cfc3ddff903e97af99 (patch) | |
tree | f46d70c7791f9045bb5e96ae5cfdb8ee9d4f6eb0 /net/sunrpc/xprtrdma | |
parent | 254f91e2fa1f4cc18fd2eb9d5481888ffe126d5b (diff) |
xprtrdma: Remove BOUNCEBUFFERS memory registration mode
Clean up: This memory registration mode is slow and was never
meant for use in production environments. Remove it to reduce
implementation complexity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma')
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 11 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 13 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 5 |
3 files changed, 1 insertions, 28 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index c296468a6f96..02b29419e372 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c | |||
@@ -77,9 +77,6 @@ static const char transfertypes[][12] = { | |||
77 | * Prepare the passed-in xdr_buf into representation as RPC/RDMA chunk | 77 | * Prepare the passed-in xdr_buf into representation as RPC/RDMA chunk |
78 | * elements. Segments are then coalesced when registered, if possible | 78 | * elements. Segments are then coalesced when registered, if possible |
79 | * within the selected memreg mode. | 79 | * within the selected memreg mode. |
80 | * | ||
81 | * Note, this routine is never called if the connection's memory | ||
82 | * registration strategy is 0 (bounce buffers). | ||
83 | */ | 80 | */ |
84 | 81 | ||
85 | static int | 82 | static int |
@@ -439,14 +436,6 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst) | |||
439 | wtype = rpcrdma_noch; | 436 | wtype = rpcrdma_noch; |
440 | BUG_ON(rtype != rpcrdma_noch && wtype != rpcrdma_noch); | 437 | BUG_ON(rtype != rpcrdma_noch && wtype != rpcrdma_noch); |
441 | 438 | ||
442 | if (r_xprt->rx_ia.ri_memreg_strategy == RPCRDMA_BOUNCEBUFFERS && | ||
443 | (rtype != rpcrdma_noch || wtype != rpcrdma_noch)) { | ||
444 | /* forced to "pure inline"? */ | ||
445 | dprintk("RPC: %s: too much data (%d/%d) for inline\n", | ||
446 | __func__, rqst->rq_rcv_buf.len, rqst->rq_snd_buf.len); | ||
447 | return -1; | ||
448 | } | ||
449 | |||
450 | hdrlen = 28; /*sizeof *headerp;*/ | 439 | hdrlen = 28; /*sizeof *headerp;*/ |
451 | padlen = 0; | 440 | padlen = 0; |
452 | 441 | ||
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 1eb9c468d0c9..8c5035a2792e 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -503,18 +503,6 @@ xprt_rdma_allocate(struct rpc_task *task, size_t size) | |||
503 | * If the allocation or registration fails, the RPC framework | 503 | * If the allocation or registration fails, the RPC framework |
504 | * will (doggedly) retry. | 504 | * will (doggedly) retry. |
505 | */ | 505 | */ |
506 | if (rpcx_to_rdmax(xprt)->rx_ia.ri_memreg_strategy == | ||
507 | RPCRDMA_BOUNCEBUFFERS) { | ||
508 | /* forced to "pure inline" */ | ||
509 | dprintk("RPC: %s: too much data (%zd) for inline " | ||
510 | "(r/w max %d/%d)\n", __func__, size, | ||
511 | rpcx_to_rdmad(xprt).inline_rsize, | ||
512 | rpcx_to_rdmad(xprt).inline_wsize); | ||
513 | size = req->rl_size; | ||
514 | rpc_exit(task, -EIO); /* fail the operation */ | ||
515 | rpcx_to_rdmax(xprt)->rx_stats.failed_marshal_count++; | ||
516 | goto out; | ||
517 | } | ||
518 | if (task->tk_flags & RPC_TASK_SWAPPER) | 506 | if (task->tk_flags & RPC_TASK_SWAPPER) |
519 | nreq = kmalloc(sizeof *req + size, GFP_ATOMIC); | 507 | nreq = kmalloc(sizeof *req + size, GFP_ATOMIC); |
520 | else | 508 | else |
@@ -543,7 +531,6 @@ xprt_rdma_allocate(struct rpc_task *task, size_t size) | |||
543 | req = nreq; | 531 | req = nreq; |
544 | } | 532 | } |
545 | dprintk("RPC: %s: size %zd, request 0x%p\n", __func__, size, req); | 533 | dprintk("RPC: %s: size %zd, request 0x%p\n", __func__, size, req); |
546 | out: | ||
547 | req->rl_connect_cookie = 0; /* our reserved value */ | 534 | req->rl_connect_cookie = 0; /* our reserved value */ |
548 | return req->rl_xdr_buf; | 535 | return req->rl_xdr_buf; |
549 | 536 | ||
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 9cb88f373c7a..4a4e4eafdb32 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -557,7 +557,6 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) | |||
557 | * adapter. | 557 | * adapter. |
558 | */ | 558 | */ |
559 | switch (memreg) { | 559 | switch (memreg) { |
560 | case RPCRDMA_BOUNCEBUFFERS: | ||
561 | case RPCRDMA_REGISTER: | 560 | case RPCRDMA_REGISTER: |
562 | case RPCRDMA_FRMR: | 561 | case RPCRDMA_FRMR: |
563 | break; | 562 | break; |
@@ -778,9 +777,7 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia, | |||
778 | 777 | ||
779 | /* Client offers RDMA Read but does not initiate */ | 778 | /* Client offers RDMA Read but does not initiate */ |
780 | ep->rep_remote_cma.initiator_depth = 0; | 779 | ep->rep_remote_cma.initiator_depth = 0; |
781 | if (ia->ri_memreg_strategy == RPCRDMA_BOUNCEBUFFERS) | 780 | if (devattr.max_qp_rd_atom > 32) /* arbitrary but <= 255 */ |
782 | ep->rep_remote_cma.responder_resources = 0; | ||
783 | else if (devattr.max_qp_rd_atom > 32) /* arbitrary but <= 255 */ | ||
784 | ep->rep_remote_cma.responder_resources = 32; | 781 | ep->rep_remote_cma.responder_resources = 32; |
785 | else | 782 | else |
786 | ep->rep_remote_cma.responder_resources = devattr.max_qp_rd_atom; | 783 | ep->rep_remote_cma.responder_resources = devattr.max_qp_rd_atom; |