qemu-devel
[Top][All Lists]
Advanced

[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: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 09/12] sheepdog: move coroutine send/recv function to generic code
Date: Tue, 13 Sep 2011 16:14:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

Am 09.09.2011 10:11, schrieb Paolo Bonzini:
> 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 ++++++

Can we move the code somewhere else? This is not core coroutine
infrastructure. I would suggest qemu_socket.h/qemu-sockets.c.

Kevin



reply via email to

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