qemu-e2k/include/block
Stefan Hajnoczi 5905fbc9c9 block: fix I/O throttling accounting blind spot
I/O throttling relies on bdrv_acct_done() which is called when a request
completes.  This leaves a blind spot since we only charge for completed
requests, not submitted requests.

For example, if there is 1 operation remaining in this time slice the
guest could submit 3 operations and they will all be submitted
successfully since they don't actually get accounted for until they
complete.

Originally we probably thought this is okay since the requests will be
accounted when the time slice is extended.  In practice it causes
fluctuations since the guest can exceed its I/O limit and it will be
punished for this later on.

Account for I/O upon submission so that I/O limits are enforced
properly.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-By: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-04-05 18:58:05 +02:00
..
aes.h
aio.h aio: add a ThreadPool instance to AioContext 2013-03-15 16:07:50 +01:00
block_int.h block: fix I/O throttling accounting blind spot 2013-04-05 18:58:05 +02:00
block.h block: Add options QDict to bdrv_file_open() prototypes 2013-03-22 17:51:31 +01:00
blockjob.h
coroutine_int.h
coroutine.h coroutine: use AioContext for CoQueue BH 2013-03-15 16:07:51 +01:00
nbd.h nbd: Remove unused functions 2013-03-22 17:51:32 +01:00
thread-pool.h threadpool: drop global thread pool 2013-03-15 16:07:51 +01:00