Skip to contentSkip to conversation

nvme/pci: Remove last_cq_head

PATCH In review Keith Busch 2 participants 3 messages Dec 2, 2019 – Dec 3, 2019 NVMe

lore
Share & tools
lore

Keith Busch

author maintainer
#0 lore raw

PATCH 1/1 nvme/pci: Remove last_cq_head

We had been saving the last_cq_head seen from an interrupt so that a polled queue wouldn't mistakenly trigger spruious interrupt detection. We don't poll interrupt driven queues any more, so saving this value is pointless.

---
 drivers/nvme/host/pci.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/nvme/host/pci.c +0 -4
index 9d307593b94f..0590640ba62c 100644
@@ -176,7 +176,6 @@ struct nvme_queue {
 	u16 sq_tail;
 	u16 last_sq_tail;
 	u16 cq_head;
-	u16 last_cq_head;
 	u16 qid;
 	u8 cq_phase;
 	u8 sqes;
@@ -1026,10 +1025,7 @@ static irqreturn_t nvme_irq(int irq, void *data)
 	 * the irq handler, even if that was on another CPU.
 	 */
 	rmb();
-	if (nvmeq->cq_head != nvmeq->last_cq_head)
-		ret = IRQ_HANDLED;
 	nvme_process_cq(nvmeq, &start, &end, -1);
-	nvmeq->last_cq_head = nvmeq->cq_head;
 	wmb();
 
 	if (start != end) {
Signature · 7 lines
2.21.0


_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Keith Busch

We had been saving the last_cq_head seen from an interrupt so that a polled queue wouldn't mistakenly trigger spruious interrupt detection. We don't poll interrupt driven queues any more, so saving this value is pointless.

Looks good:

Btw, didn't you also have some other patches to shrink the size of struct nvme_queue from a few months ago?

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

author maintainer Applied
#2 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 4 lines · Keith Busch

We had been saving the last_cq_head seen from an interrupt so that a polled queue wouldn't mistakenly trigger spruious interrupt detection. We don't poll interrupt driven queues any more, so saving this value is pointless.

Looks good:

Thanks, applied for-5.5.

Quoted 2 lines

Btw, didn't you also have some other patches to shrink the size of struct nvme_queue from a few months ago?

Yes, I need to rebase those and do more testing. As long as no kernel debugging is enabled, I believe we can fit all the nvmeq hot data in one 64B cache line.

This was just the first patch. I doubt I'll be able to get the rest completed for the current merge window, though.

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme