qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines
Date: Wed, 11 Oct 2017 13:43:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 2017-10-10 11:14, Kevin Wolf wrote:
> Am 13.09.2017 um 20:18 hat Max Reitz geschrieben:
>> In order to talk to the source BDS (and maybe in the future to the
>> target BDS as well) directly, we need to convert our existing AIO
>> requests into coroutine I/O requests.
>>
>> Signed-off-by: Max Reitz <address@hidden>
> 
> Please follow through with it and add a few patches that turn it into
> natural coroutine code rather than just any coroutine code. I know I did
> the same kind of half-assed conversion in qed, but mirror is code that
> is actually used and that people look at for more than just a bad
> example.
> 
> You'll probably notice more things when you do this, but the obvious
> things would be changing mirror_co_read() into a mirror_co_copy() with
> the former callbacks inlined; keeping op on the stack instead of
> mallocing it in mirror_perform() and free it deep inside the nested
> functions that used to be callbacks; and probably also cleaning up the
> random calls to aio_context_acquire/release() that will now appear in
> the middle of the function.
> 
> Anyway, that's for follow-up patches (though ideally in the same
> series), so for this one you can have:
> 
> Reviewed-by: Kevin Wolf <address@hidden>

Phew. :-)

I think I'll write the patches (while working on v2), but I'll send them
as a follow-up.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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