From: keith.busch@linux.intel.com (Keith Busch)
Subject: [PATCH] nvme: handle completions outside of the queue lock
Date: Thu, 17 May 2018 09:03:52 -0600 [thread overview]
Message-ID: <20180517150351.GD22063@localhost.localdomain> (raw)
In-Reply-To: <20180517074732.GA24736@infradead.org>
On Thu, May 17, 2018@12:47:32AM -0700, Christoph Hellwig wrote:
> static irqreturn_t nvme_irq_check(int irq, void *data)
> @@ -1039,7 +1024,14 @@ static int __nvme_poll(struct nvme_queue *nvmeq, unsigned int tag)
> nvme_process_cq(nvmeq, &start, &end);
> spin_unlock_irq(&nvmeq->q_lock);
>
> - return nvme_complete_cqes(nvmeq, start, end, tag);
> + while (start != end) {
> + 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.
next prev parent reply other threads:[~2018-05-17 15:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 3:23 [PATCH] nvme: handle completions outside of the queue lock Jens Axboe
2018-05-17 3:47 ` Keith Busch
2018-05-17 7:16 ` Christoph Hellwig
2018-05-17 7:47 ` Christoph Hellwig
2018-05-17 14:21 ` Jens Axboe
2018-05-17 15:03 ` Keith Busch [this message]
2018-05-17 15:29 ` Christoph Hellwig
2018-05-17 15:32 ` Keith Busch
2018-05-17 14:21 ` Keith Busch
2018-05-17 14:22 ` Jens Axboe
2018-05-17 15:30 ` Christoph Hellwig
2018-05-17 15:33 ` Jens Axboe
2018-05-17 15:35 ` Christoph Hellwig
2018-05-17 15:35 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180517150351.GD22063@localhost.localdomain \
--to=keith.busch@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).