From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 04/21] qemu-iotests: Update 093 to improve the draining test
Date: Wed, 15 Aug 2018 14:55:20 +0200 [thread overview]
Message-ID: <20180815125537.10651-5-kwolf@redhat.com> (raw)
In-Reply-To: <20180815125537.10651-1-kwolf@redhat.com>
From: Alberto Garcia <berto@igalia.com>
The previous patch fixes a problem in which draining a block device
with more than one throttled request can make it wait first for the
completion of requests in other members of the same group.
This patch updates test_remove_group_member() in iotest 093 to
reproduce that scenario. This updated test would hang QEMU without the
fix from the previous patch.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/093 | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093
index b26cd34e32..9d1971a56c 100755
--- a/tests/qemu-iotests/093
+++ b/tests/qemu-iotests/093
@@ -225,15 +225,18 @@ class ThrottleTestCase(iotests.QMPTestCase):
# Read 4KB from drive0. This is performed immediately.
self.vm.hmp_qemu_io("drive0", "aio_read 0 4096")
- # Read 4KB again. The I/O limit has been exceeded so this
+ # Read 2KB. The I/O limit has been exceeded so this
# request is throttled and a timer is set to wake it up.
- self.vm.hmp_qemu_io("drive0", "aio_read 0 4096")
+ self.vm.hmp_qemu_io("drive0", "aio_read 0 2048")
+
+ # Read 2KB again. We're still over the I/O limit so this is
+ # request is also throttled, but no new timer is set since
+ # there's already one.
+ self.vm.hmp_qemu_io("drive0", "aio_read 0 2048")
- # Read from drive1. We're still over the I/O limit so this
- # request is also throttled. There's no timer set in drive1
- # because there's already one in drive0. Once the timer in
- # drive0 fires and its throttled request is processed then the
- # next request in the queue will be scheduled: this one.
+ # Read from drive1. This request is also throttled, and no
+ # timer is set in drive1 because there's already one in
+ # drive0.
self.vm.hmp_qemu_io("drive1", "aio_read 0 4096")
# At this point only the first 4KB have been read from drive0.
@@ -248,7 +251,7 @@ class ThrottleTestCase(iotests.QMPTestCase):
result = self.vm.qmp("block_set_io_throttle", conv_keys=False, **params)
self.assert_qmp(result, 'return', {})
- # Removing the I/O limits from drive0 drains its pending request.
+ # Removing the I/O limits from drive0 drains its two pending requests.
# The read request in drive1 is still throttled.
self.assertEqual(self.blockstats('drive0')[0], 8192)
self.assertEqual(self.blockstats('drive1')[0], 0)
--
2.13.6
next prev parent reply other threads:[~2018-08-15 12:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 12:55 [Qemu-devel] [PULL 00/21] Block layer patches Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 01/21] block/qapi: Fix memory leak in qmp_query_blockstats() Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 02/21] qemu-iotests: Test removing a throttle group member with a pending timer Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 03/21] throttle-groups: Skip the round-robin if a member is being drained Kevin Wolf
2018-08-15 12:55 ` Kevin Wolf [this message]
2018-08-15 12:55 ` [Qemu-devel] [PULL 05/21] throttle-groups: Don't allow timers without throttled requests Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 06/21] luks: Allow share-rw=on Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 07/21] block: Remove deprecated -drive geometry options Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 08/21] block: Remove deprecated -drive option addr Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 09/21] block: Remove deprecated -drive option serial Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 10/21] block: Remove dead deprecation warning code Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 11/21] qapi/block: Document restrictions for node names Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 12/21] mirror: Fail gracefully for source == target Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 13/21] qemu-img: fix regression copying secrets during convert Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 14/21] block: make .bdrv_close optional Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 15/21] block: drop empty .bdrv_close handlers Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 16/21] qdict: Make qdict_extract_subqdict() accept dst = NULL Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 17/21] block: Remove children options from bs->{options, explicit_options} Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 18/21] block: Simplify bdrv_reopen_abort() Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 19/21] block: Update bs->options if bdrv_reopen() succeeds Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 20/21] block: Simplify append_open_options() Kevin Wolf
2018-08-15 12:55 ` [Qemu-devel] [PULL 21/21] qapi: block: Remove mentions of error types which were removed Kevin Wolf
2018-08-16 8:50 ` [Qemu-devel] [PULL 00/21] Block layer patches Peter Maydell
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=20180815125537.10651-5-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--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).