linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme: Acknowledge completion queue on each iteration
@ 2017-07-17 22:36 Sinan Kaya
  2017-07-17 22:45 ` Keith Busch
  2017-07-19  9:20 ` Sagi Grimberg
  0 siblings, 2 replies; 10+ messages in thread
From: Sinan Kaya @ 2017-07-17 22:36 UTC (permalink / raw)
  To: linux-arm-kernel

Code is moving the completion queue doorbell after processing all completed
events and sending callbacks to the block layer on each iteration.

This is causing a performance drop when a lot of jobs are queued towards
the HW. Move the completion queue doorbell on each loop instead and allow new
jobs to be queued by the HW.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
 drivers/nvme/host/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index d10d2f2..33d9b5b 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -810,13 +810,12 @@ static void nvme_process_cq(struct nvme_queue *nvmeq)
 
 	while (nvme_read_cqe(nvmeq, &cqe)) {
 		nvme_handle_cqe(nvmeq, &cqe);
+		nvme_ring_cq_doorbell(nvmeq);
 		consumed++;
 	}
 
-	if (consumed) {
-		nvme_ring_cq_doorbell(nvmeq);
+	if (consumed)
 		nvmeq->cqe_seen = 1;
-	}
 }
 
 static irqreturn_t nvme_irq(int irq, void *data)
-- 
1.9.1

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

end of thread, other threads:[~2017-07-19 10:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 22:36 [PATCH] nvme: Acknowledge completion queue on each iteration Sinan Kaya
2017-07-17 22:45 ` Keith Busch
2017-07-17 22:46   ` Sinan Kaya
2017-07-17 22:56     ` Keith Busch
2017-07-17 23:07       ` okaya at codeaurora.org
2017-07-18 14:36         ` Keith Busch
2017-07-18 18:52           ` Sinan Kaya
2017-07-18 21:26             ` Keith Busch
2017-07-19  9:20 ` Sagi Grimberg
2017-07-19 10:37   ` Sinan Kaya

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).