All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 3/7] nvme-fc: remove unused poll implementation
Date: Sat, 17 Nov 2018 14:43:50 -0700	[thread overview]
Message-ID: <20181117214354.822-4-axboe@kernel.dk> (raw)
In-Reply-To: <20181117214354.822-1-axboe@kernel.dk>

This relies on the fc taget ops setting ->poll_queue, which
nobody does. Otherwise it just checks if something has
completed, which isn't very useful.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 drivers/nvme/host/fc.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 98c3c77f48f6..de797c641265 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2302,38 +2302,6 @@ nvme_fc_queue_rq(struct blk_mq_hw_ctx *hctx,
 	return nvme_fc_start_fcp_op(ctrl, queue, op, data_len, io_dir);
 }
 
-static struct blk_mq_tags *
-nvme_fc_tagset(struct nvme_fc_queue *queue)
-{
-	if (queue->qnum == 0)
-		return queue->ctrl->admin_tag_set.tags[queue->qnum];
-
-	return queue->ctrl->tag_set.tags[queue->qnum - 1];
-}
-
-static int
-nvme_fc_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag)
-
-{
-	struct nvme_fc_queue *queue = hctx->driver_data;
-	struct nvme_fc_ctrl *ctrl = queue->ctrl;
-	struct request *req;
-	struct nvme_fc_fcp_op *op;
-
-	req = blk_mq_tag_to_rq(nvme_fc_tagset(queue), tag);
-	if (!req)
-		return 0;
-
-	op = blk_mq_rq_to_pdu(req);
-
-	if ((atomic_read(&op->state) == FCPOP_STATE_ACTIVE) &&
-		 (ctrl->lport->ops->poll_queue))
-		ctrl->lport->ops->poll_queue(&ctrl->lport->localport,
-						 queue->lldd_handle);
-
-	return ((atomic_read(&op->state) != FCPOP_STATE_ACTIVE));
-}
-
 static void
 nvme_fc_submit_async_event(struct nvme_ctrl *arg)
 {
@@ -2404,7 +2372,6 @@ static const struct blk_mq_ops nvme_fc_mq_ops = {
 	.init_request	= nvme_fc_init_request,
 	.exit_request	= nvme_fc_exit_request,
 	.init_hctx	= nvme_fc_init_hctx,
-	.poll		= nvme_fc_poll,
 	.timeout	= nvme_fc_timeout,
 };
 
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: axboe@kernel.dk (Jens Axboe)
Subject: [PATCH 3/7] nvme-fc: remove unused poll implementation
Date: Sat, 17 Nov 2018 14:43:50 -0700	[thread overview]
Message-ID: <20181117214354.822-4-axboe@kernel.dk> (raw)
In-Reply-To: <20181117214354.822-1-axboe@kernel.dk>

This relies on the fc taget ops setting ->poll_queue, which
nobody does. Otherwise it just checks if something has
completed, which isn't very useful.

Signed-off-by: Jens Axboe <axboe at kernel.dk>
---
 drivers/nvme/host/fc.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 98c3c77f48f6..de797c641265 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2302,38 +2302,6 @@ nvme_fc_queue_rq(struct blk_mq_hw_ctx *hctx,
 	return nvme_fc_start_fcp_op(ctrl, queue, op, data_len, io_dir);
 }
 
-static struct blk_mq_tags *
-nvme_fc_tagset(struct nvme_fc_queue *queue)
-{
-	if (queue->qnum == 0)
-		return queue->ctrl->admin_tag_set.tags[queue->qnum];
-
-	return queue->ctrl->tag_set.tags[queue->qnum - 1];
-}
-
-static int
-nvme_fc_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag)
-
-{
-	struct nvme_fc_queue *queue = hctx->driver_data;
-	struct nvme_fc_ctrl *ctrl = queue->ctrl;
-	struct request *req;
-	struct nvme_fc_fcp_op *op;
-
-	req = blk_mq_tag_to_rq(nvme_fc_tagset(queue), tag);
-	if (!req)
-		return 0;
-
-	op = blk_mq_rq_to_pdu(req);
-
-	if ((atomic_read(&op->state) == FCPOP_STATE_ACTIVE) &&
-		 (ctrl->lport->ops->poll_queue))
-		ctrl->lport->ops->poll_queue(&ctrl->lport->localport,
-						 queue->lldd_handle);
-
-	return ((atomic_read(&op->state) != FCPOP_STATE_ACTIVE));
-}
-
 static void
 nvme_fc_submit_async_event(struct nvme_ctrl *arg)
 {
@@ -2404,7 +2372,6 @@ static const struct blk_mq_ops nvme_fc_mq_ops = {
 	.init_request	= nvme_fc_init_request,
 	.exit_request	= nvme_fc_exit_request,
 	.init_hctx	= nvme_fc_init_hctx,
-	.poll		= nvme_fc_poll,
 	.timeout	= nvme_fc_timeout,
 };
 
-- 
2.17.1

  parent reply	other threads:[~2018-11-17 21:44 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 21:43 [PATCHSET v4] Various block optimizations Jens Axboe
2018-11-17 21:43 ` Jens Axboe
2018-11-17 21:43 ` [PATCH 1/7] block: avoid ordered task state change for polled IO Jens Axboe
2018-11-17 21:43   ` Jens Axboe
2018-11-19  7:58   ` Christoph Hellwig
2018-11-19  7:58     ` Christoph Hellwig
2018-11-17 21:43 ` [PATCH 2/7] block: have ->poll_fn() return number of entries polled Jens Axboe
2018-11-17 21:43   ` Jens Axboe
2018-11-19  7:58   ` Christoph Hellwig
2018-11-19  7:58     ` Christoph Hellwig
2018-11-25 10:52   ` Sagi Grimberg
2018-11-25 10:52     ` Sagi Grimberg
2018-11-25 13:41     ` Jens Axboe
2018-11-25 13:41       ` Jens Axboe
2018-11-27 10:10       ` Sagi Grimberg
2018-11-27 10:10         ` Sagi Grimberg
2018-11-27 15:20         ` Jens Axboe
2018-11-27 15:20           ` Jens Axboe
2018-11-17 21:43 ` Jens Axboe [this message]
2018-11-17 21:43   ` [PATCH 3/7] nvme-fc: remove unused poll implementation Jens Axboe
2018-11-19  7:59   ` Christoph Hellwig
2018-11-19  7:59     ` Christoph Hellwig
2018-11-19 15:19     ` Jens Axboe
2018-11-19 15:19       ` Jens Axboe
2018-11-19 19:00       ` James Smart
2018-11-19 19:00         ` James Smart
2018-11-17 21:43 ` [PATCH 4/7] blk-mq: when polling for IO, look for any completion Jens Axboe
2018-11-17 21:43   ` Jens Axboe
2018-11-19  8:02   ` Christoph Hellwig
2018-11-19  8:02     ` Christoph Hellwig
2018-11-19 15:20     ` Jens Axboe
2018-11-19 15:20       ` Jens Axboe
2018-11-17 21:43 ` [PATCH 5/7] blk-mq: remove 'tag' parameter from mq_ops->poll() Jens Axboe
2018-11-17 21:43   ` Jens Axboe
2018-11-19  8:02   ` Christoph Hellwig
2018-11-19  8:02     ` Christoph Hellwig
2018-11-17 21:43 ` [PATCH 6/7] block: make blk_poll() take a parameter on whether to spin or not Jens Axboe
2018-11-17 21:43   ` Jens Axboe
2018-11-19  8:05   ` Christoph Hellwig
2018-11-19  8:05     ` Christoph Hellwig
2018-11-19 15:21     ` Jens Axboe
2018-11-19 15:21       ` Jens Axboe
2018-11-20  9:11       ` Sagi Grimberg
2018-11-20  9:11         ` Sagi Grimberg
2018-11-17 21:43 ` [PATCH 7/7] blk-mq: ensure mq_ops ->poll() is entered at least once Jens Axboe
2018-11-17 21:43   ` Jens Axboe
2018-11-19  8:05   ` Christoph Hellwig
2018-11-19  8:05     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181117214354.822-4-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.