Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH] nvme/pci: Remove last_sq_tail
Date: Thu, 12 Dec 2019 10:20:13 +0100	[thread overview]
Message-ID: <20191212092013.GE2399@lst.de> (raw)
In-Reply-To: <20191205200825.27651-1-kbusch@kernel.org>

On Fri, Dec 06, 2019 at 05:08:25AM +0900, Keith Busch wrote:
> We don't allocate enough tags to wrap the submission queue. Remove
> tracking for this condition.

We can totally wrap the sq - just a single command at the end of
the SQ will wrap it.  We are however never going to wrap it around
to the point that we'll overwrite other unsubmitted entries.  So
I think you change looks good, but the commit log needs a better
explanation.

> @@ -502,8 +492,7 @@ static void nvme_commit_rqs(struct blk_mq_hw_ctx *hctx)
>  	struct nvme_queue *nvmeq = hctx->driver_data;
>  
>  	spin_lock(&nvmeq->sq_lock);
> -	if (nvmeq->sq_tail != nvmeq->last_sq_tail)
> -		nvme_write_sq_db(nvmeq, true);
> +	nvme_write_sq_db(nvmeq);
>  	spin_unlock(&nvmeq->sq_lock);

Also this change means we now always submit in commit_rqs.  This makes
total sense as we only commit after having submitted commands, but it
is another thing worth mentioning in the commit log.

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

  parent reply	other threads:[~2019-12-12  9:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 20:08 [PATCH] nvme/pci: Remove last_sq_tail Keith Busch
2019-12-05 20:31 ` Nadolski, Edmund
2019-12-05 20:48   ` Keith Busch
2019-12-12  9:20 ` Christoph Hellwig [this message]
2019-12-12 15:47   ` Keith Busch
2019-12-12 20:11     ` Sagi Grimberg

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=20191212092013.GE2399@lst.de \
    --to=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox