From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Damien Le Moal <dlemoal@kernel.org>,
Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH v6 1/7] block: Introduce the flag QUEUE_FLAG_NO_ZONE_WRITE_LOCK
Date: Tue, 8 Aug 2023 16:27:05 -0600 [thread overview]
Message-ID: <067228e1-cd13-cf70-40fd-409f9b9ba557@kernel.dk> (raw)
In-Reply-To: <ede0c18a-f5d0-94af-5175-9be54aa85082@acm.org>
On 8/8/23 3:46?PM, Bart Van Assche wrote:
> On 8/8/23 14:19, Jens Axboe wrote:
>> On 8/4/23 9:47?AM, Bart Van Assche wrote:
>>> Writes in sequential write required zones must happen at the write
>>> pointer. Even if the submitter of the write commands (e.g. a filesystem)
>>> submits writes for sequential write required zones in order, the block
>>> layer or the storage controller may reorder these write commands.
>>>
>>> The zone locking mechanism in the mq-deadline I/O scheduler serializes
>>> write commands for sequential zones. Some but not all storage controllers
>>> require this serialization. Introduce a new request queue flag to allow
>>> block drivers to indicate that they preserve the order of write commands
>>> and thus do not require serialization of writes per zone.
>>
>> Looking at how this is used, why not call it QUEUE_FLAG_ZONE_WRITE_LOCK
>> instead? That'd make the code easier to immediately grok, rather than
>> deal with double negations.
>
> Hi Jens,
>
> Do I understand correctly that you want me to set the
> QUEUE_FLAG_ZONE_WRITE_LOCK flag for all request queues by adding it to
> QUEUE_FLAG_MQ_DEFAULT and also that the UFS driver should clear the
> QUEUE_FLAG_ZONE_WRITE_LOCK flag?
I don't think setting that flag by default makes a lot of sense, if the
device in question isn't zoned. Maybe have variants of BLK_ZONED_* which
has a locked and unlocked variant for each where it applies? Perhaps
have the lock flag be common between them so you can check them in the
same way? That'd keep the fact that it's zoned and if it needs locking
in the same spot, rather than scatter them in two spots.
--
Jens Axboe
next prev parent reply other threads:[~2023-08-08 22:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 15:47 [PATCH v6 0/7] Improve performance for zoned UFS devices Bart Van Assche
2023-08-04 15:47 ` [PATCH v6 1/7] block: Introduce the flag QUEUE_FLAG_NO_ZONE_WRITE_LOCK Bart Van Assche
2023-08-08 21:19 ` Jens Axboe
2023-08-08 21:46 ` Bart Van Assche
2023-08-08 22:27 ` Jens Axboe [this message]
2023-08-09 13:45 ` Bart Van Assche
2023-08-04 15:48 ` [PATCH v6 2/7] block/mq-deadline: Only use zone locking if necessary Bart Van Assche
2023-08-04 15:48 ` [PATCH v6 3/7] scsi: core: Retry unaligned zoned writes Bart Van Assche
2023-08-08 2:24 ` Martin K. Petersen
2023-08-08 14:20 ` Bart Van Assche
2023-08-04 15:48 ` [PATCH v6 4/7] scsi: scsi_debug: Support disabling zone write locking Bart Van Assche
2023-08-04 15:48 ` [PATCH v6 5/7] scsi: scsi_debug: Support injecting unaligned write errors Bart Van Assche
2023-08-04 15:48 ` [PATCH v6 6/7] scsi: ufs: Split an if-condition Bart Van Assche
2023-08-07 9:10 ` Can Guo
2023-08-04 15:48 ` [PATCH v6 7/7] scsi: ufs: Disable zone write locking Bart Van Assche
2023-08-07 9:11 ` Can Guo
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=067228e1-cd13-cf70-40fd-409f9b9ba557@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.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;
as well as URLs for NNTP newsgroup(s).