On 06.04.22 17:32, Vladimir Sementsov-Ogievskiy wrote:
Virtual clock just doesn't tick for iotests, and throttling just not
work. Let's use realtime clock.
It does tick when you make it take, specifically with the clock_step
qtest command. 093 does this, and so with this patch, it fails, because
it is no longer deterministic.
So far, if I needed realtime throttling, I simply switched the
accelerator to tcg (e.g. in stream-error-on-reset).
I’m not really opposed to this, but it does break 093, and without
looking too closely into it, I would guess that it’d be difficult to
rewrite 093 in a deterministic way without it relying on throttling
using the virtual clock. (A runtime option for the throttle-group
object to choose the clock type might be an option.)
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@openvz.org>
---
block/throttle-groups.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index fb203c3ced..029158d797 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -753,10 +753,6 @@ static void throttle_group_obj_init(Object *obj)
ThrottleGroup *tg = THROTTLE_GROUP(obj);
tg->clock_type = QEMU_CLOCK_REALTIME;
- if (qtest_enabled()) {
- /* For testing block IO throttling only */
- tg->clock_type = QEMU_CLOCK_VIRTUAL;
- }
tg->is_initialized = false;
qemu_mutex_init(&tg->lock);
throttle_init(&tg->ts);