[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/1] coroutine-lock: do not touch coroutine a
From: |
Roman Penyaev |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/1] coroutine-lock: do not touch coroutine after another one has been entered |
Date: |
Wed, 31 May 2017 15:25:30 +0200 |
On Wed, May 31, 2017 at 3:22 PM, Paolo Bonzini <address@hidden> wrote:
>
>
> On 31/05/2017 15:06, Stefan Hajnoczi wrote:
>>> +
>>> + while ((next = QSIMPLEQ_FIRST(&tmp_queue_wakeup))) {
>>> + QSIMPLEQ_REMOVE_HEAD(&tmp_queue_wakeup, co_queue_next);
>>> qemu_coroutine_enter(next);
>>> }
>>> }
>> What happens if co remains alive and qemu_coroutine_enter(next) causes
>> additional coroutines to add themselves to co->co_queue_wakeup?
>
> Wouldn't that happen only if co is entered again? Then it will also
> reenter qemu_co_queue_run_restart, which may cause a different wakeup
> order but not any missing wakeups.
Exactly, that what I tried to show with stupid arrows in another mail.
I am not sure that I've succeeded :)
--
Roman