[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueu
From: |
Richard Henderson |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable |
Date: |
Sat, 3 Feb 2018 12:50:58 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 02/03/2018 07:39 AM, Paolo Bonzini wrote:
> There are cases in which a queued coroutine must be restarted from
> non-coroutine context (with qemu_co_enter_next). In this cases,
> qemu_co_enter_next also needs to be thread-safe, but it cannot use
> a CoMutex and so cannot qemu_co_queue_wait. Use QemuLockable so
> that the CoQueue can interchangeably use CoMutex or QemuMutex.
>
> Reviewed-by: Stefan Hajnoczi <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> include/qemu/coroutine.h | 6 +++++-
> util/qemu-coroutine-lock.c | 12 +++++++-----
> 2 files changed, 12 insertions(+), 6 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-block] [PATCH v5 0/5] coroutine-lock: polymorphic CoQueue, Paolo Bonzini, 2018/02/03
- [Qemu-block] [PATCH 1/5] test-coroutine: add simple CoMutex test, Paolo Bonzini, 2018/02/03
- [Qemu-block] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable, Paolo Bonzini, 2018/02/03
- Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable,
Richard Henderson <=
- [Qemu-block] [PATCH 2/5] lockable: add QemuLockable, Paolo Bonzini, 2018/02/03
- [Qemu-block] [PATCH 4/5] coroutine-lock: make qemu_co_enter_next thread-safe, Paolo Bonzini, 2018/02/03
- [Qemu-block] [PATCH 5/5] curl: convert to CoQueue, Paolo Bonzini, 2018/02/03
- Re: [Qemu-block] [PATCH v5 0/5] coroutine-lock: polymorphic CoQueue, Stefan Hajnoczi, 2018/02/05
- Re: [Qemu-block] [PATCH v5 0/5] coroutine-lock: polymorphic CoQueue, Fam Zheng, 2018/02/07