From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIDRY-0006C8-R1 for qemu-devel@nongnu.org; Thu, 23 Jul 2015 06:09:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIDRU-0000qN-W0 for qemu-devel@nongnu.org; Thu, 23 Jul 2015 06:09:36 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:36810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIDRU-0000pr-N1 for qemu-devel@nongnu.org; Thu, 23 Jul 2015 06:09:32 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Jul 2015 11:09:29 +0100 Message-ID: <55B0BD55.4010600@de.ibm.com> Date: Thu, 23 Jul 2015 12:09:25 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1437143029-12100-1-git-send-email-stefanha@redhat.com> <1437143029-12100-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1437143029-12100-2-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , qemu-block@nongnu.org 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 had that myself on a freshly installed system without libaio-devel. Acked-by: Christian Borntraeger 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; >