]> Git Repo - qemu.git/commit
block: Switch to host monotonic clock for IO throttling
authorFam Zheng <[email protected]>
Wed, 25 Mar 2015 07:27:26 +0000 (15:27 +0800)
committerKevin Wolf <[email protected]>
Tue, 28 Apr 2015 13:36:08 +0000 (15:36 +0200)
commitde50a20a4cc368d241d67c600f8c0f667186a8b5
tree7ae53f858318d15057da6ba1f5ce4edb47f3e3c1
parent8b6ee9aeb3f0508ed2a41381cde13bdb8707b7be
block: Switch to host monotonic clock for IO throttling

Currently, throttle timers won't make any progress when VCPU is not
running, which would stall the request queue in utils, qtest, vm
suspending, and live migration, without special handling.

Block jobs are confusingly inconsistent between with and without
throttling: if user sets a bps limit, stops the vm, then start a block
job, the block job will not make any progress; in contrary, if user
unsets the bps limit, or if it's not set, the block job will run
normally.

After this patch, with the host clock, even if the VCPUs are stopped,
the throttle queues will be processed.

This patch also enables potential to add throttle to bdrv_drain_all.
Currently all requests are drained immediately. In other words whenever
it is called, IO throttling goes ineffective (examples: system reset,
migration and many block job operations.). This is a loophole that guest
could exploit. If we use the host clock, we can later just trust the
nested poll. This could be done on top.

Note that for qemu-iotests case 093, which uses qtest, we still keep vm
clock so the script can control the clock stepping in order to be
deterministic.

Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-id: 1427268446[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block.c
This page took 0.026634 seconds and 4 git commands to generate.