From: Anthony Liguori <aliguori@us.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/3] Implement linux-aio backend
Date: Fri, 18 Apr 2008 10:18:33 -0500 [thread overview]
Message-ID: <4808BBC9.6040502@us.ibm.com> (raw)
In-Reply-To: <20080418150956.GB19341@dmt>
Marcelo Tosatti wrote:
> On Thu, Apr 17, 2008 at 02:26:52PM -0500, Anthony Liguori wrote:
>
>> This patch introduces a Linux-aio backend that is disabled by default. To
>> use this backend effectively, the user should disable caching and select
>> it with the appropriate -aio option. For instance:
>>
>> qemu-system-x86_64 -drive foo.img,cache=off -aio linux
>>
>> There's no universal way to asynchronous wait with linux-aio. At some point,
>> signals were added to signal completion. More recently, and eventfd interface
>> was added. This patch relies on the later.
>>
>> We try hard to detect whether the right support is available in configure to
>> avoid compile failures.
>>
>
>
>> + do {
>> + err = io_submit(aio_ctxt_id, 1, iocbs);
>> + } while (err == -1 && errno == EINTR);
>> +
>> + if (err != 1) {
>> + fprintf(stderr, "failed to submit aio request: %m\n");
>> + exit(1);
>> + }
>> +
>> + outstanding_requests++;
>> +
>> + return &aiocb->common;
>> +}
>> +
>> +static void la_wait(void)
>> +{
>> + main_loop_wait(10);
>> +}
>>
>
> Sleeping in the context of vcpu's is extremely bad (eg virtio-block
> blocks in write() throttling which kills performance). It should wait
> on IO completions instead (qemu-kvm.c creates a pthread "waitqueue" to
> resolve that issue).
>
> Other than that looks fine to me, will give it a try.
>
FWIW, I'm not getting wonderful results in KVM. It's hard to tell
though because time seems wildly inaccurate (even with kvm clock in the
guest). The time issue appears unrelated to this set of patches.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-04-18 15:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 19:26 [Qemu-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations Anthony Liguori
2008-04-17 19:26 ` [Qemu-devel] [PATCH 2/3] Split out posix-aio code Anthony Liguori
2008-04-17 19:26 ` [Qemu-devel] [PATCH 3/3] Implement linux-aio backend Anthony Liguori
2008-04-18 15:09 ` [Qemu-devel] " Marcelo Tosatti
2008-04-18 15:18 ` Anthony Liguori [this message]
2008-04-18 17:46 ` Marcelo Tosatti
2008-04-17 19:38 ` [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations Daniel P. Berrange
2008-04-17 19:41 ` Anthony Liguori
2008-04-17 20:00 ` Daniel P. Berrange
2008-04-17 20:05 ` Anthony Liguori
2008-04-18 12:43 ` Jamie Lokier
2008-04-18 15:23 ` Anthony Liguori
2008-04-18 16:22 ` Jamie Lokier
2008-04-18 16:32 ` [kvm-devel] [Qemu-devel] " Avi Kivity
2008-04-20 15:49 ` Jamie Lokier
2008-04-20 18:43 ` Avi Kivity
2008-04-20 23:39 ` Jamie Lokier
2008-04-21 6:39 ` Avi Kivity
2008-04-21 12:10 ` Jamie Lokier
2008-04-22 8:10 ` Avi Kivity
2008-04-22 14:28 ` Jamie Lokier
2008-04-22 14:53 ` Anthony Liguori
2008-04-22 15:05 ` Avi Kivity
2008-04-22 15:23 ` Jamie Lokier
2008-04-22 15:12 ` Jamie Lokier
2008-04-22 15:03 ` Avi Kivity
2008-04-22 15:36 ` Jamie Lokier
2008-05-02 16:37 ` Antonio Vargas
2008-05-02 17:18 ` Jamie Lokier
2008-05-02 17:52 ` Anthony Liguori
2008-05-02 18:24 ` Jamie Lokier
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=4808BBC9.6040502@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).