linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@fb.com>, Long Li <longli@microsoft.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH V2 2/2] nvme-pci: check CQ after batch submission for Microsoft device
Date: Thu, 14 Nov 2019 00:53:06 +0900	[thread overview]
Message-ID: <20191113155306.GA26795@redsun51.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <20191113134248.26022-3-ming.lei@redhat.com>

On Wed, Nov 13, 2019 at 09:42:48PM +0800, Ming Lei wrote:
> +static void nvme_check_cq(struct nvme_queue *nvmeq)
> +{
> +	if (test_bit(NVMEQ_CHECK_CQ, &nvmeq->flags) &&
> +			nvme_cqe_pending(nvmeq)) {
> +		unsigned long flags;
> +
> +		if (spin_trylock_irqsave(&nvmeq->cq_lock, flags)) {

What's with the irqsave? This isn't called from an irq disabled context.

Not saying I'm on board with this approach, though. Checking the cq
during submission was cheap when submission and completion sides shared
the same lock, but this quite different than what we previously had.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2019-11-13 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 13:42 [PATCH V2 0/2] " Ming Lei
2019-11-13 13:42 ` [PATCH V2 1/2] nvme-pci: move sq/cq_poll lock initialization into nvme_init_queue Ming Lei
2019-11-13 13:42 ` [PATCH V2 2/2] nvme-pci: check CQ after batch submission for Microsoft device Ming Lei
2019-11-13 15:53   ` Keith Busch [this message]
2019-11-14  1:30     ` Ming Lei
2019-11-14  1:39       ` Ming Lei
2019-11-13 23:11   ` Nadolski, Edmund
2019-11-14  1:34     ` Ming Lei

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=20191113155306.GA26795@redsun51.ssa.fujisawa.hgst.com \
    --to=kbusch@kernel.org \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=longli@microsoft.com \
    --cc=ming.lei@redhat.com \
    --cc=sagi@grimberg.me \
    --subject='Re: [PATCH V2 2/2] nvme-pci: check CQ after batch submission for Microsoft device' \
    /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

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).