[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/17] nbd: convert to use qio_channel_yield
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 07/17] nbd: convert to use qio_channel_yield |
Date: |
Mon, 30 Jan 2017 15:50:44 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, Jan 20, 2017 at 05:43:12PM +0100, Paolo Bonzini wrote:
> + aio_co_wake(s->recv_coroutine[i]);
>
> - qemu_coroutine_enter(nbd_get_client_session(bs)->send_coroutine);
> + /* We're woken up by the recv_coroutine itself. */
> + qemu_coroutine_yield();
This relies on recv_coroutine() entering us only after we've yielded -
otherwise QEMU will crash. The code and comments don't make it obvious
why this is guaranteed to be safe.
signature.asc
Description: PGP signature
[Qemu-devel] [PATCH 09/17] qed: introduce qed_aio_start_io and qed_aio_next_io_cb, Paolo Bonzini, 2017/01/20
[Qemu-devel] [PATCH 10/17] aio: push aio_context_acquire/release down to dispatching, Paolo Bonzini, 2017/01/20
[Qemu-devel] [PATCH 11/17] block: explicitly acquire aiocontext in timers that need it, Paolo Bonzini, 2017/01/20
[Qemu-devel] [PATCH 15/17] aio-posix: partially inline aio_dispatch into aio_poll, Paolo Bonzini, 2017/01/20
[Qemu-devel] [PATCH 13/17] block: explicitly acquire aiocontext in bottom halves that need it, Paolo Bonzini, 2017/01/20
[Qemu-devel] [PATCH 14/17] block: explicitly acquire aiocontext in aio callbacks that need it, Paolo Bonzini, 2017/01/20