[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 3/3] Implement linux-aio backend
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] Re: [PATCH 3/3] Implement linux-aio backend |
Date: |
Fri, 18 Apr 2008 12:09:56 -0300 |
User-agent: |
Mutt/1.4.2.1i |
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.
- [Qemu-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Anthony Liguori, 2008/04/17
- [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Daniel P. Berrange, 2008/04/17
- [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Anthony Liguori, 2008/04/17
- [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Daniel P. Berrange, 2008/04/17
- [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Anthony Liguori, 2008/04/17
- Re: [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Jamie Lokier, 2008/04/18
- Re: [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Anthony Liguori, 2008/04/18
- Re: [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Jamie Lokier, 2008/04/18
- Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/3] Refactor AIO interface to allow other AIO implementations, Avi Kivity, 2008/04/18