linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Hindborg <andreas.hindborg@wdc.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Andreas Hindborg <andreas.hindborg@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: Fri, 18 Nov 2022 10:29:15 +0100	[thread overview]
Message-ID: <877czs8uwh.fsf@wdc.com> (raw)
In-Reply-To: <0f0ef3e2-5585-6187-6f61-d2fb1af54441@opensource.wdc.com>


Damien Le Moal <damien.lemoal@opensource.wdc.com> writes:

[...]
>> Unless I am reading the trace wrong there are 3 reads issued to 259,1
>> sectors 6144, 4096 and 2048 in that order. This is the order userspace
>> is issuing the reads, so the trace matches what I would expect. But now
>> you tell me that the mq-deadline scheduler should reorder the requests
>> based on LBA? But maybe the ordering by LBA is only for writes? I'll
>> rerun the test with writes.
>
> Nope. Reordering is for reads too. But reordering happens only if the
> commands are issued in batch or if the drive is busy (all tags used) and
> commands accumulate in the scheduler.
>
> If the user issues these reads one at a time, they will go through the
> scheduler without reordering. You can see that with blktrace:
> If you see a G-Q-I-D sequence for each read, then it is not a batch and
> they are going through as is. If you see G-Q-I-G-Q-I-G-Q-I-D-D-D, then
> that was a batch and the "D" should be ordered in increasing LBA, even if
> the I (insert) where out of order.

I see. Looking at the full trace it does show that only part of the
series of the reversed requests from ublksrv are batched up. They are
not submitted in one go from ublksrv.

Thanks,
Andreas

  reply	other threads:[~2022-11-18  9:38 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 [this message]
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
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=877czs8uwh.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).