@@ -175,7 +175,9 @@ static void bdrv_io_limits_intercept(BlockDriverState *bs,
int64_t wait_time = -1;
if (!qemu_co_queue_empty(&bs->throttled_reqs)) {
+ fprintf(stderr, "bs %p co %p waiting for throttled_reqs\n", bs, qemu_coroutine_self());
qemu_co_queue_wait(&bs->throttled_reqs);
+ fprintf(stderr, "bs %p co %p woke up from throttled_reqs\n", bs, qemu_coroutine_self());
}
/* In fact, we hope to keep each request's timing, in FIFO mode. The next
@@ -188,7 +190,9 @@ static void bdrv_io_limits_intercept(BlockDriverState *bs,
while (bdrv_exceed_io_limits(bs, nb_sectors, is_write, &wait_time)) {
qemu_mod_timer(bs->block_timer,
wait_time + qemu_get_clock_ns(vm_clock));
+ fprintf(stderr, "bs %p co %p throttled for %"PRId64" ms\n", bs, qemu_coroutine_self(), wait_time
qemu_co_queue_wait_insert_head(&bs->throttled_reqs);
+ fprintf(stderr, "bs %p co %p woke up from throttled_reqs after sleeping\n", bs, qemu_coroutine_s
}
qemu_co_queue_next(&bs->throttled_reqs);