[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 8/8] block: enable throttle with aiocontext
From: |
Liu Ping Fan |
Subject: |
[Qemu-devel] [RFC 8/8] block: enable throttle with aiocontext |
Date: |
Sun, 21 Jul 2013 16:43:05 +0800 |
Signed-off-by: Liu Ping Fan <address@hidden>
---
block.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index c6b7b6c..b9e6cc8 100644
--- a/block.c
+++ b/block.c
@@ -149,7 +149,12 @@ static void bdrv_block_timer(void *opaque)
void bdrv_io_limits_enable(BlockDriverState *bs)
{
qemu_co_queue_init(&bs->throttled_reqs);
- bs->block_timer = qemu_new_timer_ns(vm_clock, bdrv_block_timer, bs);
+ if (!bs->ctx) {
+ bs->block_timer = qemu_new_timer_ns(vm_clock, bdrv_block_timer, bs);
+ } else {
+ bs->block_timer = aioctx_new_timer_ns(vm_clock, bdrv_block_timer, bs,
+ bs->ctx);
+ }
bs->io_limits_enabled = true;
}
--
1.8.1.4
- Re: [Qemu-devel] [RFC 3/8] timer: make timers_state static, (continued)
- [Qemu-devel] [RFC 7/8] block: associate BlockDriverState with AioContext, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 8/8] block: enable throttle with aiocontext,
Liu Ping Fan <=
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/21
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/22
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, liu ping fan, 2013/07/22
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, liu ping fan, 2013/07/22
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Paolo Bonzini, 2013/07/23