From: Andreas Hindborg <andreas.hindborg@wdc.com>
To: Andreas Hindborg <andreas.hindborg@wdc.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: Reordering of ublk IO requests
Date: Mon, 21 Nov 2022 11:15:02 +0100 [thread overview]
Message-ID: <878rk47gsd.fsf@wdc.com> (raw)
In-Reply-To: <87cz9j75l5.fsf@wdc.com>
Andreas Hindborg <andreas.hindborg@wdc.com> writes:
> Damien Le Moal <damien.lemoal@opensource.wdc.com> writes:
>
>> On 11/18/22 21:47, Ming Lei wrote:
>>> Anytime, there is at most one write IO for each zone, how can the single
>>> write IO be re-order?
>>
>> If the user issues writes one at a time out of order (not aligned to the
>> write pointer), mq-deadline will not help at all. The zone write locking
>> will still limit write dispatching to one per zone, but the writes will fail.
>>
>> mq-deadline will reorder write commands in the correct lba order only if:
>> - the commands are inserted as a batch (more than on request passed to
>> ->insert_requests)
>> - commands are inserted individually when the target zone is locked (a
>> write is already being executed)
>>
>> This has been the semantic from the start: the block layer has no
>> guarantees about the correct ordering of writes to zoned drive. What is
>> guaranteed is that (1) if the user issues writes in order AND (2)
>> mq-deadline is used, then writes will be dispatched in the same order to
>> the device.
>>
>> I have not looked at the details of ublk, but from the thread, I think (1)
>> is not done and (2) is missing-ish as the ublk device is not marked as zoned.
>
> I have a patch in the works for adding zoned storage support to ublk. It
> sets up the ublk device as a zoned device. It is very much work in
> progress, but it lives here [1] for now.
>
> I am pretty sure that I saw large writes to zoned ublk device being
> split and issued to the device (same zone) with multiple outstanding
> requests at the same time. I'll verify on Monday and provide a test case
> if that is the case. Might be I configured the ublk device wrong? I set
> it up as host managed zoned and set up zone size, max active, max open.
Turns out I was not setting up the zone bitmaps. I was missing a call to
blk_revalidate_disk_zones() and that took out the zone lock in the
deadline scheduler. With that in place, everything works as it should.
Thanks for the help everyone!
Best regards,
Andreas
next prev parent reply other threads:[~2022-11-21 10:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 15:00 Reordering of ublk IO requests Andreas Hindborg
2022-11-17 2:18 ` Ming Lei
2022-11-17 8:05 ` Andreas Hindborg
2022-11-17 8:52 ` Ming Lei
2022-11-17 9:07 ` Andreas Hindborg
2022-11-17 11:47 ` Ming Lei
2022-11-17 11:59 ` Andreas Hindborg
2022-11-17 13:11 ` Damien Le Moal
2022-11-17 13:31 ` Andreas Hindborg
2022-11-18 1:51 ` Damien Le Moal
2022-11-18 9:29 ` Andreas Hindborg
2022-11-18 4:12 ` Ming Lei
2022-11-18 4:35 ` Damien Le Moal
2022-11-18 6:07 ` Ming Lei
2022-11-18 9:41 ` Andreas Hindborg
2022-11-18 11:28 ` Ming Lei
2022-11-18 11:49 ` Andreas Hindborg
2022-11-18 12:46 ` Andreas Hindborg
2022-11-18 12:47 ` Ming Lei
2022-11-19 0:24 ` Damien Le Moal
2022-11-19 7:36 ` Andreas Hindborg
2022-11-21 10:15 ` Andreas Hindborg [this message]
2022-11-20 14:37 ` Ming Lei
2022-11-21 1:25 ` Damien Le Moal
2022-11-21 8:03 ` Christoph Hellwig
2022-11-21 8:13 ` Ming Lei
2022-11-17 13:00 ` Damien Le Moal
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=878rk47gsd.fsf@wdc.com \
--to=andreas.hindborg@wdc.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=linux-block@vger.kernel.org \
--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).