From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzGh1-0006IR-Ro for qemu-devel@nongnu.org; Mon, 03 Dec 2007 14:10:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzGh1-0006HC-4i for qemu-devel@nongnu.org; Mon, 03 Dec 2007 14:10:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzGh0-0006Gy-U7 for qemu-devel@nongnu.org; Mon, 03 Dec 2007 14:10:59 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzGh0-0004Er-51 for qemu-devel@nongnu.org; Mon, 03 Dec 2007 14:10:58 -0500 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 272C819D948 for ; Mon, 3 Dec 2007 20:10:56 +0100 (CET) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02898-01 for ; Mon, 3 Dec 2007 20:10:52 +0100 (CET) Received: from ecn002.frec.bull.fr (ecn002.frec.bull.fr [129.183.4.6]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 8A3F819D909 for ; Mon, 3 Dec 2007 20:10:52 +0100 (CET) Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O From: Laurent Vivier In-Reply-To: <47544588.10700@codemonkey.ws> References: <11966765602186@bull.net> <4753D920.4060500@bellard.org> <1196677804.5275.5.camel@frecb07144> <475426C7.20503@codemonkey.ws> <20071203170800.GC3797@implementation> <47544588.10700@codemonkey.ws> Date: Mon, 03 Dec 2007 20:10:44 +0100 Message-Id: <1196709044.5587.20.camel@frecb07144> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-mascUfp5ADPLoztQRymU" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-mascUfp5ADPLoztQRymU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le lundi 03 d=C3=A9cembre 2007 =C3=A0 12:06 -0600, Anthony Liguori a =C3=A9= crit : > Samuel Thibault wrote: > > Anthony Liguori, le Mon 03 Dec 2007 09:54:47 -0600, a =C3=A9crit : > > =20 > >> Have you done any performance testing? Buffered IO should absolutely=20 > >> beat direct IO simply because buffered IO allows writes to complete=20 > >> before they actually hit disk. > >> =20 > > > > Since qemu can use the aio interface, that shouldn't matter. > > =20 >=20 > Well, let's separate a few things. QEMU uses posix-aio which uses=20 > threads and normal read/write operations. It also limits the number of=20 > threads that aio uses to 1 which effectively makes everything=20 > synchronous anyway. Yes, librt is providing posix-aio, and librt coming with GNU libc uses threads. But if I remember correctly librt coming with RHEL uses a mix of threads and linux kernel AIO (you can have a look to the .srpm of libc). There is also the libaio I wrote some years ago (with S=C3=A9bastien Dugu= =C3=A9) which is purely linux kernel AIO (but kernel patches were never included because of Zach Brown Asynchronous System Call work) BTW, if everyone thinks it could be a good idea I can port block-raw.c to use linux kernel AIO (without removing POSIX AIO support, of course) > But it still doesn't matter. When you issue a write() on an O_DIRECT=20 > fd, the write does not complete until the data has made it's way to=20 > disk. The guest can still run if you're using O_NONBLOCK but the IDE=20 > device will not submit another IO request until you complete the DMA=20 > operation. >=20 > The SCSI device supports multiple outstanding operations but it's=20 > limited to 16 but you'll never see more than one request at a time in=20 > QEMU currently because of the limitation to a single thread. >=20 > Regards, >=20 > Anthony Liguori >=20 > > Samuel > > > > > > > > =20 >=20 >=20 >=20 --=20 ------------- Laurent.Vivier@bull.net -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke --=-mascUfp5ADPLoztQRymU Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHVFS09Kffa9pFVzwRAuP6AJoCieBxcBO05nWYG7rpSCzclSxNZQCfdJ1O oaS/+BBkHYrqzgRxBYkJtro= =msAM -----END PGP SIGNATURE----- --=-mascUfp5ADPLoztQRymU--