All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iotests/030: Reduce run time by unthrottling job earlier
@ 2020-05-13 10:00 Kevin Wolf
  2020-05-13 11:38 ` Alberto Garcia
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2020-05-13 10:00 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel

test_overlapping_3() throttles its active commit job so it can be sure
the job is still busy when it checks that you can't start a conflicting
streaming job.

However, it only sets the commit job back to full speed when it is
ready, which takes a few seconds while it's throttled. We can already
reset the limit after having checked that block-stream returns an error
and save these seconds.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/030 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 104e3cee1b..1cdd7e2999 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -354,14 +354,14 @@ class TestParallelOps(iotests.QMPTestCase):
         self.assert_qmp(result, 'error/desc',
             "Node 'node5' is busy: block device is in use by block job: commit")
 
+        result = self.vm.qmp('block-job-set-speed', device='commit-drive0', speed=0)
+        self.assert_qmp(result, 'return', {})
+
         event = self.vm.event_wait(name='BLOCK_JOB_READY')
         self.assert_qmp(event, 'data/device', 'commit-drive0')
         self.assert_qmp(event, 'data/type', 'commit')
         self.assert_qmp_absent(event, 'data/error')
 
-        result = self.vm.qmp('block-job-set-speed', device='commit-drive0', speed=0)
-        self.assert_qmp(result, 'return', {})
-
         result = self.vm.qmp('block-job-complete', device='commit-drive0')
         self.assert_qmp(result, 'return', {})
 
-- 
2.25.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iotests/030: Reduce run time by unthrottling job earlier
  2020-05-13 10:00 [PATCH] iotests/030: Reduce run time by unthrottling job earlier Kevin Wolf
@ 2020-05-13 11:38 ` Alberto Garcia
  0 siblings, 0 replies; 2+ messages in thread
From: Alberto Garcia @ 2020-05-13 11:38 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: kwolf, qemu-devel

On Wed 13 May 2020 12:00:25 PM CEST, Kevin Wolf wrote:
> test_overlapping_3() throttles its active commit job so it can be sure
> the job is still busy when it checks that you can't start a conflicting
> streaming job.
>
> However, it only sets the commit job back to full speed when it is
> ready, which takes a few seconds while it's throttled. We can already
> reset the limit after having checked that block-stream returns an error
> and save these seconds.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Reviewed-by: Alberto Garcia <berto@igalia.com>

Berto


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-13 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 10:00 [PATCH] iotests/030: Reduce run time by unthrottling job earlier Kevin Wolf
2020-05-13 11:38 ` Alberto Garcia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.