From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme/pci: Remove last_sq_tail
Date: Fri, 13 Dec 2019 00:47:47 +0900 [thread overview]
Message-ID: <20191212154747.GB30534@redsun51.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <20191212092013.GE2399@lst.de>
On Thu, Dec 12, 2019 at 10:20:13AM +0100, Christoph Hellwig wrote:
> 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.
Right, I mean "wrap" to indicate the tail passes the head.
> > @@ -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.
Yes, will update the comments.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2019-12-12 15:47 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
2019-12-12 15:47 ` Keith Busch [this message]
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=20191212154747.GB30534@redsun51.ssa.fujisawa.hgst.com \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--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;
as well as URLs for NNTP newsgroup(s).