diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2014-05-28 10:33:34 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2014-06-04 08:56:43 -0400 |
commit | 7f23f6f6e388d2003c4ecf5d558f3c2191e12530 (patch) | |
tree | 082b8cfb518dd87fe8b0ff6e70f371022c12e180 /net/sunrpc | |
parent | fc66448549bbb77f2f1a38b270ab2d6b6a22da33 (diff) |
xprtrmda: Reduce lock contention in completion handlers
Skip the ib_poll_cq() after re-arming, if the provider knows there
are no additional items waiting. (Have a look at commit ed23a727 for
more details).
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index af2d097c221f..c7d5281063fd 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -192,8 +192,11 @@ rpcrdma_sendcq_upcall(struct ib_cq *cq, void *cq_context) | |||
192 | return; | 192 | return; |
193 | } | 193 | } |
194 | 194 | ||
195 | rc = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); | 195 | rc = ib_req_notify_cq(cq, |
196 | if (rc) { | 196 | IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS); |
197 | if (rc == 0) | ||
198 | return; | ||
199 | if (rc < 0) { | ||
197 | dprintk("RPC: %s: ib_req_notify_cq failed: %i\n", | 200 | dprintk("RPC: %s: ib_req_notify_cq failed: %i\n", |
198 | __func__, rc); | 201 | __func__, rc); |
199 | return; | 202 | return; |
@@ -272,8 +275,11 @@ rpcrdma_recvcq_upcall(struct ib_cq *cq, void *cq_context) | |||
272 | return; | 275 | return; |
273 | } | 276 | } |
274 | 277 | ||
275 | rc = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); | 278 | rc = ib_req_notify_cq(cq, |
276 | if (rc) { | 279 | IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS); |
280 | if (rc == 0) | ||
281 | return; | ||
282 | if (rc < 0) { | ||
277 | dprintk("RPC: %s: ib_req_notify_cq failed: %i\n", | 283 | dprintk("RPC: %s: ib_req_notify_cq failed: %i\n", |
278 | __func__, rc); | 284 | __func__, rc); |
279 | return; | 285 | return; |