From patchwork Wed Apr 30 19:31:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 4095861 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B27D1BFF02 for ; Wed, 30 Apr 2014 19:31:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE26120328 for ; Wed, 30 Apr 2014 19:31:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F11CB20303 for ; Wed, 30 Apr 2014 19:31:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945930AbaD3TbP (ORCPT ); Wed, 30 Apr 2014 15:31:15 -0400 Received: from mail-ig0-f169.google.com ([209.85.213.169]:52691 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964913AbaD3TbP (ORCPT ); Wed, 30 Apr 2014 15:31:15 -0400 Received: by mail-ig0-f169.google.com with SMTP id h18so7729127igc.2 for ; Wed, 30 Apr 2014 12:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=FuH278KQfnMzqcQBF/xd3I8TltU22fsEyT4swHeN1gE=; b=0bHs03jbpxFjp7wqS2CUzGfsFXos74iM6LxKkxOdt4WBdzqMmAwHrrYASPa251QVC4 rcyTjql444D196yV6KffHUMgY7lH5r0w+/LlmBKtSCLHPSlJAAxrsy/9B9t4poqaJHXh mDtKij8+Q3If3t9iQHSgxRKPd3gyiwEtgWHnW1EjJ8mvjRxWGUS6LjdOlDZmxbdq2x9u K39sVxYeUZgnsDuMsjAy4Up0r21Y+FmlfOrER8vhokpy2cuLHcINsiWZfJuXCCHj0gWa o1vj3y8Qo7pvO2dx8FzfC0NAah4UHyFpJPVA0DfFnRhZr49SWeYw8+TvgqMNrY84OPj6 xShg== X-Received: by 10.50.25.136 with SMTP id c8mr40670161igg.26.1398886274605; Wed, 30 Apr 2014 12:31:14 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by mx.google.com with ESMTPSA id om5sm8521051igb.16.2014.04.30.12.31.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Apr 2014 12:31:14 -0700 (PDT) From: Chuck Lever Subject: [PATCH V3 12/17] xprtrmda: Reduce lock contention in completion handlers To: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Cc: Anna.Schumaker@netapp.com Date: Wed, 30 Apr 2014 15:31:13 -0400 Message-ID: <20140430193113.5663.89235.stgit@manet.1015granger.net> In-Reply-To: <20140430191433.5663.16217.stgit@manet.1015granger.net> References: <20140430191433.5663.16217.stgit@manet.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- net/sunrpc/xprtrdma/verbs.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index af2d097..c7d5281 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;