[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv fun
From: |
MORITA Kazutaka |
Subject: |
Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code |
Date: |
Tue, 13 Sep 2011 09:28:44 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/22.3 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Fri, 9 Sep 2011 10:11:38 +0200,
Paolo Bonzini wrote:
>
> Outside coroutines, avoid busy waiting on EAGAIN by temporarily
> making the socket blocking.
>
> The API of qemu_recvv/qemu_sendv is slightly different from
> do_readv/do_writev because they do not handle coroutines. It
> returns the number of bytes written before encountering an
> EAGAIN. The specificity of yielding on EAGAIN is entirely in
> qemu-coroutine.c.
>
> Cc: MORITA Kazutaka <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> Thanks for the review. I checked with qemu-io that all of
>
> readv -v 0 524288 (x8)
> readv -v 0 262144 (x16)
> readv -v 0 1024 (x4096)
> readv -v 0 1536 (x2730) 1024
> readv -v 0 1024 512 (x2730) 1024
>
> work and produce the same output, while previously they would fail.
> Looks like it's hard to trigger the code just with qemu.
>
> block/sheepdog.c | 225
> ++++++------------------------------------------------
> cutils.c | 103 +++++++++++++++++++++++++
> qemu-common.h | 3 +
> qemu-coroutine.c | 70 +++++++++++++++++
> qemu-coroutine.h | 26 ++++++
> 5 files changed, 225 insertions(+), 202 deletions(-)
Thanks, this passed qemu-iotests on Sheepdog.
Reviewed-by: MORITA Kazutaka <address@hidden>
- [Qemu-devel] [PATCH 11/12] nbd: switch to asynchronous operation, (continued)
- [Qemu-devel] [PATCH 12/12] nbd: split requests, Paolo Bonzini, 2011/09/08
- [Qemu-devel] [PATCH 09/12] sheepdog: move coroutine send/recv function to generic code, Paolo Bonzini, 2011/09/08
- Re: [Qemu-devel] [PATCH 09/12] sheepdog: move coroutine send/recv function to generic code, MORITA Kazutaka, 2011/09/09
- [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code, Paolo Bonzini, 2011/09/09
- Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code,
MORITA Kazutaka <=
- Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code, Kevin Wolf, 2011/09/13
- Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code, Paolo Bonzini, 2011/09/13
- Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code, Kevin Wolf, 2011/09/13
- Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code, Paolo Bonzini, 2011/09/13
[Qemu-devel] [PATCH 10/12] block: add bdrv_co_flush support, Paolo Bonzini, 2011/09/08
[Qemu-devel] [PATCH 04/12] nbd: add support for NBD_CMD_FLUSH, Paolo Bonzini, 2011/09/08
[Qemu-devel] [PATCH 07/12] sheepdog: add coroutine_fn markers, Paolo Bonzini, 2011/09/08
[Qemu-devel] [PATCH 05/12] nbd: add support for NBD_CMD_FLAG_FUA, Paolo Bonzini, 2011/09/08