From: Bart Van Assche <bvanassche@acm.org>
To: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>, Can Guo <quic_cang@quicinc.com>,
Avri Altman <avri.altman@wdc.com>,
Damien Le Moal <dlemoal@kernel.org>,
Ming Lei <ming.lei@redhat.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Bean Huo <beanhuo@micron.com>,
Asutosh Das <quic_asutoshd@quicinc.com>,
Arthur Simchaev <Arthur.Simchaev@wdc.com>
Subject: Re: [PATCH v8 9/9] scsi: ufs: Inform the block layer about write ordering
Date: Mon, 14 Aug 2023 09:23:18 -0700 [thread overview]
Message-ID: <4b3d0fa7-cccb-b206-e48a-c5ee48560ea4@acm.org> (raw)
In-Reply-To: <668f296c-48f3-02ef-5ac1-30131579ea8d@quicinc.com>
On 8/12/23 10:09, Bao D. Nguyen wrote:
> I am not reviewing other patches in this series, so I don't know the
> whole context. Here is my comment on this patch alone.
>
> Looks like you rely on ufshcd_auto_hibern8_update() being invoked so
> that you can update the driver_preserves_write_order. However, the
> hba->ahit value can be updated by the vendor's driver, and
> ufshcd_auto_hibern8_enable() can be invoked without
> ufshcd_auto_hibern8_update(). Therefore, you may have a situation where
> the driver_preserves_write_order is true by default, but
> Auto-hibernation is enabled by default.
Hi Bao,
Other than setting a default value for auto-hibernation, vendor drivers
must not modify the auto-hibernation settings.
ufshcd_auto_hibern8_enable() calls from outside
ufshcd_auto_hibern8_update() are used to reapply auto-hibernation
settings and not to modify auto-hibernation settings.
So I think that integrating the following change on top of this patch is
sufficient:
@@ -5172,7 +5172,9 @@ static int ufshcd_slave_configure(struct
scsi_device *sdev)
ufshcd_hpb_configure(hba, sdev);
- q->limits.driver_preserves_write_order = true;
+ q->limits.driver_preserves_write_order =
+ !ufshcd_is_auto_hibern8_supported(hba) ||
+ FIELD_GET(UFSHCI_AHIBERN8_TIMER_MASK, hba->ahit) == 0;
blk_queue_update_dma_pad(q, PRDT_DATA_BYTE_COUNT_PAD - 1);
if (hba->quirks & UFSHCD_QUIRK_4KB_DMA_ALIGNMENT)
blk_queue_update_dma_alignment(q, SZ_4K - 1);
Thanks,
Bart.
next prev parent reply other threads:[~2023-08-14 16:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 21:35 [PATCH v8 0/9] Improve performance for zoned UFS devices Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 1/9] block: Introduce more member variables related to zone write locking Bart Van Assche
2023-08-14 12:32 ` Damien Le Moal
2023-08-14 16:57 ` Bart Van Assche
2023-08-15 2:01 ` Damien Le Moal
2023-08-15 16:06 ` Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 2/9] block/mq-deadline: Only use zone locking if necessary Bart Van Assche
2023-08-14 12:33 ` Damien Le Moal
2023-08-14 17:00 ` Bart Van Assche
2023-08-15 1:57 ` Damien Le Moal
2023-08-11 21:35 ` [PATCH v8 3/9] scsi: core: Call .eh_prepare_resubmit() before resubmitting Bart Van Assche
2023-08-14 1:19 ` Damien Le Moal
2023-08-14 2:18 ` Bart Van Assche
2023-08-14 2:41 ` Damien Le Moal
2023-08-14 3:23 ` Bart Van Assche
2023-08-14 4:18 ` Damien Le Moal
2023-08-14 17:52 ` Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 4/9] scsi: sd: Sort commands by LBA " Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 5/9] scsi: core: Retry unaligned zoned writes Bart Van Assche
2023-08-14 12:36 ` Damien Le Moal
2023-08-14 17:57 ` Bart Van Assche
2023-08-15 1:52 ` Damien Le Moal
2023-08-15 17:29 ` Bart Van Assche
2023-08-16 1:13 ` Damien Le Moal
2023-08-16 19:59 ` Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 6/9] scsi: scsi_debug: Support disabling zone write locking Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 7/9] scsi: scsi_debug: Support injecting unaligned write errors Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 8/9] scsi: ufs: Split an if-condition Bart Van Assche
2023-08-11 21:35 ` [PATCH v8 9/9] scsi: ufs: Inform the block layer about write ordering Bart Van Assche
2023-08-12 17:09 ` Bao D. Nguyen
2023-08-14 16:23 ` Bart Van Assche [this message]
2023-08-15 3:20 ` Bao D. Nguyen
2023-08-15 15:41 ` Bart Van Assche
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=4b3d0fa7-cccb-b206-e48a-c5ee48560ea4@acm.org \
--to=bvanassche@acm.org \
--cc=Arthur.Simchaev@wdc.com \
--cc=avri.altman@wdc.com \
--cc=axboe@kernel.dk \
--cc=beanhuo@micron.com \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=stanley.chu@mediatek.com \
/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