All of lore.kernel.org
 help / color / mirror / Atom feed
From: jthumshirn@suse.de (Johannes Thumshirn)
Subject: [PATCH rfc 1/6] nvme-pci: Split __nvme_process_cq to poll and handle
Date: Mon, 10 Oct 2016 09:25:30 +0200	[thread overview]
Message-ID: <20161010072530.fh5ngwttzmu3x375@linux-x5ow.site> (raw)
In-Reply-To: <d92a6b4c-70bb-1ede-9f4a-4d80941f2cda@grimberg.me>

On Wed, Oct 05, 2016@07:52:02PM +0300, Sagi Grimberg wrote:
> 
> > > +static int __nvme_process_cq(struct nvme_queue *nvmeq, int *tag)
> > > +{
> > > +	struct nvme_completion cqe;
> > > +	int consumed = 0;
> > > 
> > > -	}
> > > +	while (nvme_read_cqe(nvmeq, &cqe)) {
> > > +		nvme_handle_cqe(nvmeq, &cqe);
> > > 
> > > -	/* If the controller ignores the cq head doorbell and continuously
> > > -	 * writes to the queue, it is theoretically possible to wrap around
> > > -	 * the queue twice and mistakenly return IRQ_NONE.  Linux only
> > > -	 * requires that 0.1% of your interrupts are handled, so this isn't
> > > -	 * a big problem.
> > > -	 */
> > > -	if (head == nvmeq->cq_head && phase == nvmeq->cq_phase)
> > > -		return;
> > > +		if (tag && *tag == cqe.command_id) {
> > > +			*tag = -1;
> > > +			break;
> > > +		}
> > > +	}
> > > 
> > > -	if (likely(nvmeq->cq_vector >= 0))
> > > -		writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
> > > -	nvmeq->cq_head = head;
> > > -	nvmeq->cq_phase = phase;
> > > +	if (consumed)
> > > +		nvme_ring_cq_doorbell(nvmeq);
> > > 
> > > -	nvmeq->cqe_seen = 1;
> > > +	return consumed;
> > >  }
> > 
> > Won't 'consumed' always be 0 here and we thus never call
> > nvme_ring_cq_doorbell()? Am I overlooking something here, or is this
> > just for preparation of later patches?
> 
> that incrementation was lost in a squash. I'll restore it in v2.

OK, sounds good.

Please add my 
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
to said v2.

-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  parent reply	other threads:[~2016-10-10  7:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05  9:42 [PATCH rfc 0/6] convert nvme pci to use irq-poll service Sagi Grimberg
2016-10-05  9:42 ` [PATCH rfc 1/6] nvme-pci: Split __nvme_process_cq to poll and handle Sagi Grimberg
2016-10-05 13:21   ` Johannes Thumshirn
2016-10-05 16:52     ` Sagi Grimberg
2016-10-05 19:49       ` Jon Derrick
2016-10-10  7:25       ` Johannes Thumshirn [this message]
2016-10-05  9:42 ` [PATCH rfc 2/6] nvme-pci: Add budget to __nvme_process_cq Sagi Grimberg
2016-10-05 13:26   ` Johannes Thumshirn
2016-10-05  9:42 ` [PATCH rfc 3/6] nvme-pci: Use irq-poll for completion processing Sagi Grimberg
2016-10-05 13:40   ` Johannes Thumshirn
2016-10-05 16:57     ` Sagi Grimberg
2016-10-10  7:47       ` Johannes Thumshirn
2016-10-05  9:42 ` [PATCH rfc 4/6] nvme: don't consume cq in queue_rq Sagi Grimberg
2016-10-05 13:42   ` Johannes Thumshirn
2016-10-05  9:42 ` [PATCH rfc 5/6] nvme-pci: open-code polling logic in nvme_poll Sagi Grimberg
2016-10-05 13:52   ` Johannes Thumshirn
2016-10-05 17:02     ` Sagi Grimberg
2016-10-10  7:49       ` Johannes Thumshirn
2016-10-05  9:42 ` [PATCH rfc 6/6] nvme-pci: Get rid of threaded interrupts Sagi Grimberg
2016-10-05 13:47   ` Johannes Thumshirn
2016-10-05 21:47 ` [PATCH rfc 0/6] convert nvme pci to use irq-poll service Keith Busch
2016-10-05 21:55   ` Sagi Grimberg
2016-10-05 22:49     ` Keith Busch
2016-10-05 22:48       ` Sagi Grimberg
2016-10-27 10:09 ` Johannes Thumshirn
2016-10-27 10:31   ` Sagi Grimberg
2016-10-27 10:58     ` Johannes Thumshirn

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=20161010072530.fh5ngwttzmu3x375@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    /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.