All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Keith Busch <kbusch@kernel.org>, Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>
Subject: Re: [PATCH v3 8/8] nvme: Enable pipelining of zoned writes
Date: Tue, 28 Jun 2022 09:00:34 +0000	[thread overview]
Message-ID: <cfb8452f-d362-84df-76cc-ad3d9b46a784@nvidia.com> (raw)
In-Reply-To: <YrpyeemonjF3Lv/z@kbusch-mbp.dhcp.thefacebook.com>

On 6/27/2022 8:16 PM, Keith Busch wrote:
> On Mon, Jun 27, 2022 at 04:43:35PM -0700, Bart Van Assche wrote:
>> @@ -854,6 +854,12 @@ 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_queue_pipeline_zoned_writes(req->q) &&
>> +	    blk_rq_is_seq_zone_write(req))
>> +		nvme_req(req)->max_retries =
>> +			min(0UL + type_max(typeof(nvme_req(req)->max_retries)),
>> +			    nvme_req(req)->max_retries + req->q->nr_requests);
> 
> I can't make much sense of what the above is trying to accomplish. This
> reevaluates max_retries every time the request is retried, and the new
> max_retries is based on the previous max_retries?

I also had a hard time quickly reading the code but that maybe just me.

Perhaps a well documented comment or a helper with comment explaining 
the logic will be helpful here ?

-ck



  reply	other threads:[~2022-06-28  9:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 23:43 [PATCH v3 0/8] Improve zoned storage write performance Bart Van Assche
2022-06-27 23:43 ` [PATCH v3 1/8] block: Document blk_queue_zone_is_seq() and blk_rq_zone_is_seq() Bart Van Assche
2022-06-28  0:19   ` Chaitanya Kulkarni
2022-06-27 23:43 ` [PATCH v3 2/8] block: Introduce the blk_rq_is_seq_zone_write() function Bart Van Assche
2022-06-28  0:20   ` Chaitanya Kulkarni
2022-06-27 23:43 ` [PATCH v3 3/8] block: Introduce a request queue flag for pipelining zoned writes Bart Van Assche
2022-06-28  0:36   ` Chaitanya Kulkarni
2022-06-28  2:49     ` Bart Van Assche
2022-06-27 23:43 ` [PATCH v3 4/8] block/mq-deadline: Only use zone locking if necessary Bart Van Assche
2022-06-27 23:43 ` [PATCH v3 5/8] block/null_blk: Refactor null_queue_rq() Bart Van Assche
2022-06-28  0:37   ` Chaitanya Kulkarni
2022-06-27 23:43 ` [PATCH v3 6/8] block/null_blk: Add support for pipelining zoned writes Bart Van Assche
2022-06-28  0:39   ` Chaitanya Kulkarni
2022-06-28 16:17     ` Bart Van Assche
2022-06-27 23:43 ` [PATCH v3 7/8] nvme: Make the number of retries command specific Bart Van Assche
2022-06-28  0:48   ` Chaitanya Kulkarni
2022-06-28  2:48     ` Bart Van Assche
2022-06-27 23:43 ` [PATCH v3 8/8] nvme: Enable pipelining of zoned writes Bart Van Assche
2022-06-28  3:16   ` Keith Busch
2022-06-28  9:00     ` Chaitanya Kulkarni [this message]
2022-06-28 17:44     ` Bart Van Assche
2022-06-28  4:49   ` Christoph Hellwig
2022-06-28 16:30     ` Bart Van Assche
2022-06-29  5:51       ` Christoph Hellwig
2022-06-29  6:10       ` 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=cfb8452f-d362-84df-76cc-ad3d9b46a784@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.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 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.