From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 4/5] nvme/pci: Remove cq_vector checks in io path
Date: Mon, 22 Jan 2018 14:56:29 -0700 [thread overview]
Message-ID: <20180122215630.13697-4-keith.busch@intel.com> (raw)
In-Reply-To: <20180122215630.13697-1-keith.busch@intel.com>
We don't need to check for if the queue is suspended in the submission or
completion path. Requests to suspended queues are no longer submitted, and
we don't unmap the doorbell while requests are active.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/nvme/host/pci.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 9e9e3a59bfb3..99ac0de43206 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -889,11 +889,6 @@ static blk_status_t nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
blk_mq_start_request(req);
spin_lock_irq(&nvmeq->q_lock);
- if (unlikely(nvmeq->cq_vector < 0)) {
- ret = BLK_STS_IOERR;
- spin_unlock_irq(&nvmeq->q_lock);
- goto out_cleanup_iod;
- }
__nvme_submit_cmd(nvmeq, &cmnd);
nvme_process_cq(nvmeq);
spin_unlock_irq(&nvmeq->q_lock);
@@ -924,11 +919,9 @@ static inline void nvme_ring_cq_doorbell(struct nvme_queue *nvmeq)
{
u16 head = nvmeq->cq_head;
- if (likely(nvmeq->cq_vector >= 0)) {
- if (nvme_dbbuf_update_and_check_event(head, nvmeq->dbbuf_cq_db,
- nvmeq->dbbuf_cq_ei))
- writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
- }
+ if (nvme_dbbuf_update_and_check_event(head, nvmeq->dbbuf_cq_db,
+ nvmeq->dbbuf_cq_ei))
+ writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
}
static inline void nvme_handle_cqe(struct nvme_queue *nvmeq,
--
2.14.3
next prev parent reply other threads:[~2018-01-22 21:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 21:56 [PATCH 1/5] nvme: Request cancelling helpers Keith Busch
2018-01-22 21:56 ` [PATCH 2/5] nvme: Ending failed unstarted requests Keith Busch
2018-01-23 2:15 ` jianchao.wang
2018-01-23 13:02 ` Sagi Grimberg
2018-01-23 13:09 ` jianchao.wang
2018-01-23 2:29 ` jianchao.wang
2018-01-23 13:07 ` Sagi Grimberg
2018-01-23 13:09 ` Sagi Grimberg
2018-01-22 21:56 ` [PATCH 3/5] nvme/pci: End stopped queue requests directly Keith Busch
2018-01-23 13:14 ` Sagi Grimberg
2018-01-22 21:56 ` Keith Busch [this message]
2018-01-22 21:56 ` [PATCH 5/5] nvme: Sync queues on controller resets Keith Busch
2018-01-23 12:45 ` [PATCH 1/5] nvme: Request cancelling helpers Sagi Grimberg
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=20180122215630.13697-4-keith.busch@intel.com \
--to=keith.busch@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).