From: Chuck Lever Date: Wed, 28 May 2014 14:33:34 +0000 (-0400) Subject: xprtrmda: Reduce lock contention in completion handlers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f23f6f6e388d2003c4ecf5d558f3c2191e12530;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Anna Schumaker --- 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) return; } - rc = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); - if (rc) { + rc = ib_req_notify_cq(cq, + IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS); + if (rc == 0) + return; + if (rc < 0) { dprintk("RPC: %s: ib_req_notify_cq failed: %i\n", __func__, rc); return; @@ -272,8 +275,11 @@ rpcrdma_recvcq_upcall(struct ib_cq *cq, void *cq_context) return; } - rc = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); - if (rc) { + rc = ib_req_notify_cq(cq, + IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS); + if (rc == 0) + return; + if (rc < 0) { dprintk("RPC: %s: ib_req_notify_cq failed: %i\n", __func__, rc); return;