From: Max Reitz <mreitz@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] iotests: 077: Filter out 'resume' lines
Date: Tue, 14 Nov 2017 16:07:20 +0100 [thread overview]
Message-ID: <e6dcfec3-310e-bd86-5d43-97da38b23c7c@redhat.com> (raw)
In-Reply-To: <20171113150026.4743-1-famz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]
On 2017-11-13 16:00, Fam Zheng wrote:
> In the "Overlapping multiple requests" cases, the 3rd reqs (the break
> point B) doesn't wait for the 2nd, and once resumed the I/O will just
> continue. This is because the 2nd is already waiting for the 1st, and
> in wait_serialising_requests() there is:
>
> /* If the request is already (indirectly) waiting for us, or
> * will wait for us as soon as it wakes up, then just go on
> * (instead of producing a deadlock in the former case). */
> if (!req->waiting_for) {
> /* actually break */
> ...
> }
>
> Consequently, the following "sleep 100; resume A" command races with the
> completion of that request, and sometimes results in an unexpected
> order of output:
>
>> @@ -56,9 +56,9 @@
>> wrote XXX/XXX bytes at offset XXX
>> XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
>> blkdebug: Resuming request 'B'
>> +blkdebug: Resuming request 'A'
>> wrote XXX/XXX bytes at offset XXX
>> XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
>> -blkdebug: Resuming request 'A'
>> wrote XXX/XXX bytes at offset XXX
>> XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
>> wrote XXX/XXX bytes at offset XXX
>
> Filter out the "Resuming request" lines to make the output
> deterministic.
>
> Reported-by: Patchew <no-reply@patchew.org>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> tests/qemu-iotests/077 | 3 ++-
> tests/qemu-iotests/077.out | 48 ++++++++++++++++------------------------------
> 2 files changed, 18 insertions(+), 33 deletions(-)
Thanks, applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
prev parent reply other threads:[~2017-11-14 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 15:00 [Qemu-devel] [PATCH] iotests: 077: Filter out 'resume' lines Fam Zheng
2017-11-13 15:37 ` Eric Blake
2017-11-14 15:07 ` Max Reitz [this message]
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=e6dcfec3-310e-bd86-5d43-97da38b23c7c@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).