* [PATCH] nvme/pci: Delete misleading queue-wrap comment
@ 2016-12-09 17:08 Keith Busch
2016-12-09 18:32 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2016-12-09 17:08 UTC (permalink / raw)
It is not theoretically possible for this driver to wrap twice while
processing completions. The driver allocates only 'queue_depth - 1'
tags, so there can never be more than that to reap when processing a
completion queue. Removing this misleading comment makes it a little
less likely people with broken controllers will blame the driver for
their spurious interrupts.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/nvme/host/pci.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 8e179cf..ec4d445 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -712,15 +712,8 @@ static void __nvme_process_cq(struct nvme_queue *nvmeq, unsigned int *tag)
req = blk_mq_tag_to_rq(*nvmeq->tags, cqe.command_id);
nvme_req(req)->result = cqe.result;
blk_mq_complete_request(req, le16_to_cpu(cqe.status) >> 1);
-
}
- /* If the controller ignores the cq head doorbell and continuously
- * writes to the queue, it is theoretically possible to wrap around
- * the queue twice and mistakenly return IRQ_NONE. Linux only
- * requires that 0.1% of your interrupts are handled, so this isn't
- * a big problem.
- */
if (head == nvmeq->cq_head && phase == nvmeq->cq_phase)
return;
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] nvme/pci: Delete misleading queue-wrap comment
2016-12-09 17:08 [PATCH] nvme/pci: Delete misleading queue-wrap comment Keith Busch
@ 2016-12-09 18:32 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2016-12-09 18:32 UTC (permalink / raw)
On Fri, Dec 09, 2016@12:08:58PM -0500, Keith Busch wrote:
> It is not theoretically possible for this driver to wrap twice while
> processing completions. The driver allocates only 'queue_depth - 1'
> tags, so there can never be more than that to reap when processing a
> completion queue. Removing this misleading comment makes it a little
> less likely people with broken controllers will blame the driver for
> their spurious interrupts.
heh :)
Looks fine,
Reviewed-by: Christoph Hellwig <hch at lst.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-09 18:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 17:08 [PATCH] nvme/pci: Delete misleading queue-wrap comment Keith Busch
2016-12-09 18:32 ` Christoph Hellwig
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).