Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f23f6f6 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker
Browse files

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent fc664485
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -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;