Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nvme/pci: Remove last_cq_head
@ 2019-12-02 22:18 Keith Busch
  2019-12-03  7:36 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2019-12-02 22:18 UTC (permalink / raw)
  To: linux-nvme; +Cc: Keith Busch, hch, sagi

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.

Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/host/pci.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 9d307593b94f..0590640ba62c 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -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) {
-- 
2.21.0


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme/pci: Remove last_cq_head
  2019-12-02 22:18 [PATCH] nvme/pci: Remove last_cq_head Keith Busch
@ 2019-12-03  7:36 ` Christoph Hellwig
  2019-12-03 15:41   ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2019-12-03  7:36 UTC (permalink / raw)
  To: Keith Busch; +Cc: hch, linux-nvme, sagi

On Tue, Dec 03, 2019 at 07:18:29AM +0900, Keith Busch wrote:
> 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:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme/pci: Remove last_cq_head
  2019-12-03  7:36 ` Christoph Hellwig
@ 2019-12-03 15:41   ` Keith Busch
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Busch @ 2019-12-03 15:41 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: sagi, linux-nvme

On Tue, Dec 03, 2019 at 08:36:55AM +0100, Christoph Hellwig wrote:
> On Tue, Dec 03, 2019 at 07:18:29AM +0900, Keith Busch wrote:
> > 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:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks, applied for-5.5.
 
> 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
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 22:18 [PATCH] nvme/pci: Remove last_cq_head Keith Busch
2019-12-03  7:36 ` Christoph Hellwig
2019-12-03 15:41   ` Keith Busch

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git