Re: [PATCH 07/13] nvme-pci: don't poll from irq context when deleting queues
From: Keith Busch <hidden>
Date: 2018-11-30 14:48:03
Also in:
linux-nvme
From: Keith Busch <hidden>
Date: 2018-11-30 14:48:03
Also in:
linux-nvme
On Fri, Nov 30, 2018 at 12:08:09AM -0800, Christoph Hellwig wrote:
On Thu, Nov 29, 2018 at 01:36:32PM -0700, Keith Busch wrote:quoted
On Thu, Nov 29, 2018 at 08:13:04PM +0100, Christoph Hellwig wrote:quoted
+ + /* handle any remaining CQEs */ + if (opcode == nvme_admin_delete_cq && + !test_bit(NVMEQ_DELETE_ERROR, &nvmeq->flags)) + nvme_poll_irqdisable(nvmeq, -1);We're dispatchig lots of queue deletions in parallel, and they may complete in any order. I don't see how you can guarantee that the wait_for_completion() will return for the nvmeq that you're polling.True. I thought about moving the completion to the queue so that we have one completion per queue, and I should have done that after all. Note sure how I got the idea that not doing it is fine.
You may also move the completion polling in its own loop outside the deletion loop.