[PATCH] nvme: handle completions outside of the queue lock

Keith Busch keith.busch at linux.intel.com
Thu May 17 08:32:52 PDT 2018


On Thu, May 17, 2018 at 08:29:09AM -0700, Christoph Hellwig wrote:
> On Thu, May 17, 2018 at 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.

Maybe the batch can take the tag and stop moving the head when it finds
a match?



More information about the Linux-nvme mailing list