linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: nvme: batch completions and do them outside of the queue lock
Date: Thu, 17 May 2018 00:51:33 -0700	[thread overview]
Message-ID: <20180517075133.GB24736@infradead.org> (raw)
In-Reply-To: <20180516223538.GE20223@localhost.localdomain>

On Wed, May 16, 2018@04:35:38PM -0600, Keith Busch wrote:
> While I'm not seeing a difference, I assume you are. I tried adding on
> to this proposal by batching *all* completions without using the stack,
> exploiting the fact we never wrap the queue so it can be accessed
> lockless after moving the cq_head.

But we do wrap around, in nvme_read_cqe don't we?  From a quick look
we probably are save because we size our SQs and CQs to the number
of outstanding command, and thus the device won't be able to reuse
the slots until we complete and reuse the command ids.  But that isn't
exactly obvious from the code, so I think we really need some good
comments in the code.

      parent reply	other threads:[~2018-05-17  7:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 20:37 nvme: batch completions and do them outside of the queue lock Jens Axboe
2018-05-16 21:27 ` Keith Busch
2018-05-16 22:35   ` Keith Busch
2018-05-16 22:57     ` Jens Axboe
2018-05-16 23:10       ` Jens Axboe
2018-05-16 23:18         ` Jens Axboe
2018-05-16 23:39           ` Jens Axboe
2018-05-17  2:09             ` Keith Busch
2018-05-17  3:16               ` Jens Axboe
2018-05-17  3:16               ` Jens Axboe
2018-05-17  7:16             ` Christoph Hellwig
2018-05-17  7:51     ` Christoph Hellwig [this message]

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=20180517075133.GB24736@infradead.org \
    --to=hch@infradead.org \
    /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).