From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH] nvme: Implement Enhanced Command Retry
Date: Tue, 27 Nov 2018 16:46:26 +0100 [thread overview]
Message-ID: <20181127154626.GA26787@lst.de> (raw)
In-Reply-To: <20181127153710.6328-1-keith.busch@intel.com>
On Tue, Nov 27, 2018@08:37:10AM -0700, Keith Busch wrote:
> if (!blk_queue_dying(req->q)) {
> + unsigned long delay = 0;
> + struct nvme_ns *ns = req->q->queuedata;
> + u16 crd = (nvme_req(req)->status & NVME_SC_CRD) >> 11;
> +
> + if (crd && ns)
> + delay = ns->ctrl->crdt[crd - 1] * 100;
Do we need bounce checking for crd here?
> +
> nvme_req(req)->retries++;
> - blk_mq_requeue_request(req, true);
> + blk_mq_requeue_request(req, false);
> + blk_mq_delay_kick_requeue_list(req->q, delay);
> return;
I also think it would be nice to split out this code block into
a little nvme_retry_req ala nvme_failover_req.
Otherwise this looks sensible to me.
next prev parent reply other threads:[~2018-11-27 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 15:37 [PATCH] nvme: Implement Enhanced Command Retry Keith Busch
2018-11-27 15:46 ` Christoph Hellwig [this message]
2018-11-27 15:50 ` Keith Busch
2018-11-27 16:14 ` Christoph Hellwig
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=20181127154626.GA26787@lst.de \
--to=hch@lst.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.