All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Sagi Grimberg <sagi@grimberg.me>, Long Li <longli@microsoft.com>,
	linux-nvme@lists.infradead.org, Jens Axboe <axboe@fb.com>,
	Nadolski Edmund <edmund.nadolski@intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V3 2/2] nvme-pci: check CQ after batch submission for Microsoft device
Date: Thu, 14 Nov 2019 16:56:43 +0800	[thread overview]
Message-ID: <20191114085643.GA4213@ming.t460p> (raw)
In-Reply-To: <20191114045643.GA97802@C02WT3WMHTD6>

On Wed, Nov 13, 2019 at 09:56:43PM -0700, Keith Busch wrote:
> On Thu, Nov 14, 2019 at 10:59:17AM +0800, Ming Lei wrote:
> > @@ -912,6 +917,10 @@ static blk_status_t nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
> >  
> >  	blk_mq_start_request(req);
> >  	nvme_submit_cmd(nvmeq, &cmnd, bd->last);
> > +
> > +	if (bd->last && test_bit(NVMEQ_CHECK_CQ, &nvmeq->flags))
> > +		nvme_check_cq(nvmeq);
> > +
> 
> You've given this quirk a special completion handler, how about giving
> it a special queue_rq as well. Then you can check the completion queue
> during submission while holding the same lock as before.

We can do that, either we have to pass one extra 'check_cq' parameter to
common helper or duplicate a nvme_queue_rq_quick(). Not sure what benefit
we can get by this way, given test_bit(nvmeq->flags) is always close to
zero cost. 

Also if same lock is held in both submission & completion for the quirk,
the lock contention will be increased for the quirk since the lock has
to cover command submission, which shouldn't be needed.


Thanks,
Ming


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

  reply	other threads:[~2019-11-14  8:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14  2:59 [PATCH V3 0/2] nvme-pci: check CQ after batch submission for Microsoft device Ming Lei
2019-11-14  2:59 ` [PATCH V3 1/2] nvme-pci: move sq/cq_poll lock initialization into nvme_init_queue Ming Lei
2019-11-14  2:59 ` [PATCH V3 2/2] nvme-pci: check CQ after batch submission for Microsoft device Ming Lei
2019-11-14  4:56   ` Keith Busch
2019-11-14  8:56     ` Ming Lei [this message]
2019-11-21  3:11 ` [PATCH V3 0/2] " Ming Lei
2019-11-21  6:14   ` Christoph Hellwig
2019-11-21  7:46     ` Ming Lei
2019-11-21 15:45       ` Keith Busch
2019-11-22  9:44         ` Ming Lei
2019-11-22  9:57           ` Christoph Hellwig
2019-11-22 10:25             ` Ming Lei
2019-11-22 14:04               ` Jens Axboe
2019-11-22 21:49                 ` Ming Lei
2019-11-22 21:58                   ` Jens Axboe
2019-11-22 22:30                     ` 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=20191114085643.GA4213@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@fb.com \
    --cc=edmund.nadolski@intel.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=longli@microsoft.com \
    --cc=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.