From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AE34C43441 for ; Thu, 29 Nov 2018 19:13:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F0A821104 for ; Thu, 29 Nov 2018 19:13:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="IU1xBqOQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F0A821104 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-block-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726717AbeK3GUV (ORCPT ); Fri, 30 Nov 2018 01:20:21 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:56622 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbeK3GUV (ORCPT ); Fri, 30 Nov 2018 01:20:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dNADhd9xviHVkkwk7j5mLOQq+L79o9RgisN5N2dYn0k=; b=IU1xBqOQegoq7JdapJPPNG8tpI 3cYphf8/qs8XdTjJbt5xIyIImmmP4rNEHCe/Fz5EZimeg4nARU70iF1siTf9rpjbtyedcSmnHbPNi zrBxoaJwGMlyxMYSOoeeLUwZw/hOBj/eypN1Bpgu/1jjItaFfCWfmZnIuDkP+VjmQoFUrXMahxdZC 8bPKc2RYmDPiZXzdszwV1c0fIi26o8S8cTaHrEiQzTRwPSd683qeGkIOf/khdtCuGAYUC2ZPaFAOP fkiYBxkwTMomTnvvD8ti4vxz/FsjKAY8I+xFYI+rYoZXoeJ39Vca5PGptx69WLcP1GVAL5Xb5CCQz /WHeaKiQ==; Received: from 213-225-33-236.nat.highway.a1.net ([213.225.33.236] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSRku-0003oK-U4; Thu, 29 Nov 2018 19:13:45 +0000 From: Christoph Hellwig To: Jens Axboe , Keith Busch , Sagi Grimberg Cc: Max Gurtovoy , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org Subject: [PATCH 09/13] nvme-rdma: remove I/O polling support Date: Thu, 29 Nov 2018 20:13:06 +0100 Message-Id: <20181129191310.9795-10-hch@lst.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129191310.9795-1-hch@lst.de> References: <20181129191310.9795-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The code was always a bit of a hack that digs far too much into RDMA core internals. Lets kick it out and reimplement proper dedicated poll queues as needed. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/rdma.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index ccfde6c7c0a5..a62e9f177c06 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1736,29 +1736,6 @@ static blk_status_t nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, return BLK_STS_IOERR; } -static int nvme_rdma_poll(struct blk_mq_hw_ctx *hctx) -{ - struct nvme_rdma_queue *queue = hctx->driver_data; - struct ib_cq *cq = queue->ib_cq; - struct ib_wc wc; - int found = 0; - - while (ib_poll_cq(cq, 1, &wc) > 0) { - struct ib_cqe *cqe = wc.wr_cqe; - - if (cqe) { - if (cqe->done == nvme_rdma_recv_done) { - nvme_rdma_recv_done(cq, &wc); - found++; - } else { - cqe->done(cq, &wc); - } - } - } - - return found; -} - static void nvme_rdma_complete_rq(struct request *rq) { struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); @@ -1780,7 +1757,6 @@ static const struct blk_mq_ops nvme_rdma_mq_ops = { .init_request = nvme_rdma_init_request, .exit_request = nvme_rdma_exit_request, .init_hctx = nvme_rdma_init_hctx, - .poll = nvme_rdma_poll, .timeout = nvme_rdma_timeout, .map_queues = nvme_rdma_map_queues, }; -- 2.19.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@lst.de (Christoph Hellwig) Date: Thu, 29 Nov 2018 20:13:06 +0100 Subject: [PATCH 09/13] nvme-rdma: remove I/O polling support In-Reply-To: <20181129191310.9795-1-hch@lst.de> References: <20181129191310.9795-1-hch@lst.de> Message-ID: <20181129191310.9795-10-hch@lst.de> The code was always a bit of a hack that digs far too much into RDMA core internals. Lets kick it out and reimplement proper dedicated poll queues as needed. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/rdma.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index ccfde6c7c0a5..a62e9f177c06 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1736,29 +1736,6 @@ static blk_status_t nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, return BLK_STS_IOERR; } -static int nvme_rdma_poll(struct blk_mq_hw_ctx *hctx) -{ - struct nvme_rdma_queue *queue = hctx->driver_data; - struct ib_cq *cq = queue->ib_cq; - struct ib_wc wc; - int found = 0; - - while (ib_poll_cq(cq, 1, &wc) > 0) { - struct ib_cqe *cqe = wc.wr_cqe; - - if (cqe) { - if (cqe->done == nvme_rdma_recv_done) { - nvme_rdma_recv_done(cq, &wc); - found++; - } else { - cqe->done(cq, &wc); - } - } - } - - return found; -} - static void nvme_rdma_complete_rq(struct request *rq) { struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); @@ -1780,7 +1757,6 @@ static const struct blk_mq_ops nvme_rdma_mq_ops = { .init_request = nvme_rdma_init_request, .exit_request = nvme_rdma_exit_request, .init_hctx = nvme_rdma_init_hctx, - .poll = nvme_rdma_poll, .timeout = nvme_rdma_timeout, .map_queues = nvme_rdma_map_queues, }; -- 2.19.1