[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-coroutine-lock: fix co_queue multi-adding

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] qemu-coroutine-lock: fix co_queue multi-adding bug
Date: Mon, 09 Feb 2015 10:37:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 09/02/2015 10:36, Bin Wu wrote:
> During the mirror phase with nbd devices, if we send a cancel command or
> physical network breaks down, the source qemu process will receive a readable
> event and the main loop will invoke nbd_reply_ready to deal with it. This
> function finds the connection is down and then goes into
> nbd_teardown_connection. nbd_teardown_connection wakes up all working 
> coroutines
> by nbd_recv_coroutines_enter_all. These coroutines include the one which holds
> the sending lock, the ones which wait for the lock, and the ones which wait 
> for
> receiving messages.
> I think the purpose of nbd_recv_coroutines_enter_all is to terminate all 
> waiting
> coroutines by waking all of them up. If the coroutine waiting for the lock is
> allowed for waking up, this implementation is ok. If not, we need to 
> distinguish
> the coroutines waiting for receiving messages from the ones waiting for the 
> lock.
> In my option, if the coroutines waiting for a lock is allowd for waking up, it
> should be more robust :>

No, it's not allowed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]