Message ID | 20220614174943.611369-5-bvanassche@acm.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Improve zoned storage write performance | expand |
On Tue, Jun 14, 2022 at 10:49:42AM -0700, Bart Van Assche wrote: > @@ -854,6 +854,10 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns, > if (req->cmd_flags & REQ_RAHEAD) > dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH; > > + if (blk_rq_is_seq_write(req)) > + nvme_req(req)->max_retries += req->q->nr_hw_queues * > + req->q->nr_requests; Even with the weakest nvme devices, the result of this is unlikely to fit in a u8.
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index fe0d09fc70ba..347a06118282 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -854,6 +854,10 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns, if (req->cmd_flags & REQ_RAHEAD) dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH; + if (blk_rq_is_seq_write(req)) + nvme_req(req)->max_retries += req->q->nr_hw_queues * + req->q->nr_requests; + cmnd->rw.opcode = op; cmnd->rw.flags = 0; cmnd->rw.nsid = cpu_to_le32(ns->head->ns_id);
Before removing zone locking, increase the number of retries for zoned writes to the maximum number of outstanding commands. Cc: Christoph Hellwig <hch@lst.de> Cc: Keith Busch <kbusch@kernel.org> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+)