public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NVMe: Avoid interrupt disable during queue init.
@ 2015-05-22  0:12 Parav Pandit
  2015-05-21 18:39 ` Jens Axboe
  2015-05-21 19:34 ` Keith Busch
  0 siblings, 2 replies; 15+ messages in thread
From: Parav Pandit @ 2015-05-22  0:12 UTC (permalink / raw)
  To: linux-nvme, willy; +Cc: parav.pandit, axboe, linux-kernel

Avoid diabling interrupt and holding q_lock for the queue
which is just getting initialized.

With this change, online_queues is also incremented without
lock during queue setup stage.
if Power management nvme_suspend() kicks in during queue setup time,
per nvmeq based q_lock spinlock cannot protect device wide
online_queues variable anyway.

Signed-off-by: Parav Pandit <parav.pandit@avagotech.com>
---
 drivers/block/nvme-core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 58041c7..7f09e5e 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1437,14 +1437,12 @@ static void nvme_init_queue(struct nvme_queue *nvmeq, u16 qid)
 {
 	struct nvme_dev *dev = nvmeq->dev;
 
-	spin_lock_irq(&nvmeq->q_lock);
 	nvmeq->sq_tail = 0;
 	nvmeq->cq_head = 0;
 	nvmeq->cq_phase = 1;
 	nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
 	memset((void *)nvmeq->cqes, 0, CQ_SIZE(nvmeq->q_depth));
 	dev->online_queues++;
-	spin_unlock_irq(&nvmeq->q_lock);
 }
 
 static int nvme_create_queue(struct nvme_queue *nvmeq, int qid)
-- 
1.8.3.1


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

end of thread, other threads:[~2015-05-22 18:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22  0:12 [PATCH] NVMe: Avoid interrupt disable during queue init Parav Pandit
2015-05-21 18:39 ` Jens Axboe
2015-05-21 19:14   ` Parav Pandit
2015-05-21 19:34 ` Keith Busch
2015-05-22  4:15   ` Parav Pandit
2015-05-22 14:48     ` Keith Busch
2015-05-22 14:51       ` Parav Pandit
2015-05-22 15:11         ` Keith Busch
2015-05-22 16:03           ` Parav Pandit
2015-05-22 16:23             ` Keith Busch
2015-05-22 16:48               ` Parav Pandit
2015-05-22 17:07                 ` Keith Busch
2015-05-22 17:33                   ` Parav Pandit
2015-05-22 17:47                     ` Keith Busch
2015-05-22 18:18                       ` Parav Pandit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox