From: Fam Zheng <famz@redhat.com>
To: "rudyfly@163.com" <rudyfly@163.com>
Cc: "rudy.zhangmin" <rudy.zhangmin@huawei.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Question about drive mirror
Date: Tue, 14 Jan 2014 09:41:41 +0800 [thread overview]
Message-ID: <20140114014141.GA1377@T430.nay.redhat.com> (raw)
In-Reply-To: <2014011323440947092624@163.com>
On Mon, 01/13 23:44, rudyfly@163.com 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
next prev parent reply other threads:[~2014-01-14 1:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 15:44 [Qemu-devel] Question about drive mirror rudyfly
2014-01-14 1:41 ` Fam Zheng [this message]
2014-01-14 5:57 ` Stefan Hajnoczi
2014-01-14 15:55 ` rudyfly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140114014141.GA1377@T430.nay.redhat.com \
--to=famz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rudy.zhangmin@huawei.com \
--cc=rudyfly@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).