From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@infradead.org (Christoph Hellwig) Date: Thu, 17 May 2018 08:29:09 -0700 Subject: [PATCH] nvme: handle completions outside of the queue lock In-Reply-To: <20180517150351.GD22063@localhost.localdomain> References: <20180517034750.GA22063@localhost.localdomain> <20180517071651.GC30079@infradead.org> <20180517074732.GA24736@infradead.org> <20180517150351.GD22063@localhost.localdomain> Message-ID: <20180517152909.GA19042@infradead.org> On Thu, May 17, 2018@09:03:52AM -0600, Keith Busch wrote: > > + if (nvme_handle_cqe(nvmeq, start, tag)) > > + return 1; > > We can't return early from here anymore since the new interface moved > the CQ head. No one else is going to get to see those completions, so > the first caller owns completing everything up to the end that it claimed. Indeed. So either we have to complete everything, or we have to not do the batch processing for the poll case. Given that when we're polling we have a QD approaching one on a given core I suspect not batching for the poll case might be the right answer, but someone will have to run the numbers.