[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/10] coroutine: schedule timeout coroutine ins
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 09/10] coroutine: schedule timeout coroutine instead process it directly |
Date: |
Tue, 03 Apr 2012 13:26:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
Il 03/04/2012 10:38, Lai Jiangshan ha scritto:
> Avoid a timer callback spends too much time.
>
> Signed-off-by: Lai Jiangshan <address@hidden>
> ---
> qemu-coroutine-sleep.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/qemu-coroutine-sleep.c b/qemu-coroutine-sleep.c
> index fd65274..df9254a 100644
> --- a/qemu-coroutine-sleep.c
> +++ b/qemu-coroutine-sleep.c
> @@ -24,7 +24,7 @@ static void co_sleep_cb(void *opaque)
> CoSleepCB *sleep_cb = opaque;
>
> qemu_free_timer(sleep_cb->ts);
> - qemu_coroutine_enter(sleep_cb->co, NULL);
> + qemu_co_runnable_schedule(sleep_cb->co);
> }
>
> void coroutine_fn co_sleep_ns(QEMUClock *clock, int64_t ns)
Why is this important?
Also, why should it be different for timers, fd_handlers (used for
example by NBD) and bottom halves (used for AIO callbacks)?
Paolo
- [Qemu-devel] [PATCH 01/10] coroutine: use qemu_coroutine_switch() directly, Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 06/10] coroutine: move runnale coroutine code to qemu-coroutine.c, Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 09/10] coroutine: schedule timeout coroutine instead process it directly, Lai Jiangshan, 2012/04/03
- Re: [Qemu-devel] [PATCH 09/10] coroutine: schedule timeout coroutine instead process it directly,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 05/10] coroutine: add qemu_co_runnable_schedule(), Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 02/10] coroutine: rename unlock_bh_queue to co_runnable_queue, Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 04/10] coroutine: init co_runnable_bh during boot, Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 03/10] coroutine: rename qemu_co_queue_next_bh() to qemu_co_process_runnable(), Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 10/10] coroutine: add qemu_coroutine_run() wrapper, Lai Jiangshan, 2012/04/03