From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable
Date: Thu, 23 Jul 2015 12:09:25 +0200 [thread overview]
Message-ID: <55B0BD55.4010600@de.ibm.com> (raw)
In-Reply-To: <1437143029-12100-2-git-send-email-stefanha@redhat.com>
Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi:
> raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable.
> It is confusing when aio=native performance is identical to aio=threads
> because the binary was accidentally built without libaio.
>
> Print a deprecation warning if -drive aio=native is used with a binary
> that does not support libaio. There are probably users using aio=native
> who would be inconvenienced if QEMU suddenly refused to start their
> guests. In the future this will become an error.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
had that myself on a freshly installed system without libaio-devel.
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Another thing. Would it make sense to change the default to aio=native somewhen?
>From what I can tell this seems to outperform aio=threads in most cases.
> ---
> block/raw-posix.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/block/raw-posix.c b/block/raw-posix.c
> index 855febe..e09019c 100644
> --- a/block/raw-posix.c
> +++ b/block/raw-posix.c
> @@ -519,7 +519,16 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
> "future QEMU versions.\n",
> bs->filename);
> }
> -#endif
> +#else
> + if (bdrv_flags & BDRV_O_NATIVE_AIO) {
> + error_printf("WARNING: aio=native was specified for '%s', but "
> + "is not supported in this build. Falling back to "
> + "aio=threads.\n"
> + " This will become an error condition in "
> + "future QEMU versions.\n",
> + bs->filename);
> + }
> +#endif /* !defined(CONFIG_LINUX_AIO) */
>
> s->has_discard = true;
> s->has_write_zeroes = true;
>
next prev parent reply other threads:[~2015-07-23 10:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 14:23 [Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable Stefan Hajnoczi
2015-07-17 14:23 ` [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO " Stefan Hajnoczi
2015-07-23 10:09 ` Christian Borntraeger [this message]
2015-07-23 10:11 ` Denis V. Lunev
2015-07-23 11:58 ` Kevin Wolf
2015-07-17 14:23 ` [Qemu-devel] [PATCH v2 2/2] blockdev: always compile in -drive aio= parsing Stefan Hajnoczi
2015-07-23 7:58 ` Markus Armbruster
2015-07-23 8:03 ` [Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable Markus Armbruster
2015-07-23 8:08 ` Paolo Bonzini
2015-07-23 8:15 ` Kevin Wolf
2015-07-23 12:06 ` Stefan Hajnoczi
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=55B0BD55.4010600@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.