[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/10] coroutine: process the coroutines woken b
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 08/10] coroutine: process the coroutines woken by child when child yield |
Date: |
Thu, 05 Apr 2012 14:43:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 |
Am 03.04.2012 10:38, schrieb Lai Jiangshan:
> If the child wake up someone, process them.
>
> It would the child complete its works if woken coroutine release the locks
> that the child needs.
>
> It may help for the cache, if the child wake up some someone, they are
> probably accessing the same data.
>
> Signed-off-by: Lai Jiangshan <address@hidden>
Are you very sure that this is correct, particularly with respect to
reentrancy of nested coroutines? This is why this has become a bottom
half in the first place (instead of directly reentering the unlocked
coroutine in qemu_co_mutex_unlock), and it's not completely clear to me
if the problem doesn't exist when you do it after a coroutine has exited
instead of in an BH.
I'd be very careful with such changes.
Kevin
- Re: [Qemu-devel] [PATCH 04/10] coroutine: init co_runnable_bh during boot, (continued)
- [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
- [Qemu-devel] [PATCH 07/10] coroutine: split qemu-coroutine-lock.c, Lai Jiangshan, 2012/04/03
- [Qemu-devel] [PATCH 08/10] coroutine: process the coroutines woken by child when child yield, Lai Jiangshan, 2012/04/03
- Re: [Qemu-devel] [PATCH 08/10] coroutine: process the coroutines woken by child when child yield,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH 01/10] coroutine: use qemu_coroutine_switch() directly, Paolo Bonzini, 2012/04/03