qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Question about drive mirror


From: Fam Zheng
Subject: Re: [Qemu-devel] Question about drive mirror
Date: Tue, 14 Jan 2014 09:41:41 +0800
User-agent: Mutt/1.5.22 (2013-10-16)

On Mon, 01/13 23:44, address@hidden wrote:
> Hi,everyone.
> I tested the capability of drive mirror, I found the IO is low. Then I read 
> the code, 
> The code mirror_run() will call mirror_iteration() to read the size of buffer 
> data  
> from source storage, when the read callback ,and then in mirror_read_complete 
> () 
> write the data to the target storage, It is serial. 
> Now, I hope when it is writing the data to target storage ,we can send the 
> request 
> of reading data from source storage. Because of  using  coroutine to do it 
> ,there is 
> some troubles to achieve it. why not use Multi-thread? 
> Some one can give me some idea?

Hi,

QEMU block layer has been using coroutine as the program model even before
introducing these block jobs, so it was nature that block mirror followed this
style. With coroutines, I believe it is as possible as with multi-thread, to
have more outstanding IO requests, in order to speed up the mirroring. What's
the trouble you have?

Multi-threading needs much more synchronization mechanism than what we have in
block interface now. One day it may be possible to move block job to a thread,
but it will require quite some work.

Fam



reply via email to

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