From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzIyK-0004dU-1S for qemu-devel@nongnu.org; Mon, 03 Dec 2007 16:37:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzIyF-0004al-P0 for qemu-devel@nongnu.org; Mon, 03 Dec 2007 16:36:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzIyF-0004a7-2c for qemu-devel@nongnu.org; Mon, 03 Dec 2007 16:36:55 -0500 Received: from an-out-0708.google.com ([209.85.132.246]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzIyD-0002YM-3l for qemu-devel@nongnu.org; Mon, 03 Dec 2007 16:36:53 -0500 Received: by an-out-0708.google.com with SMTP id b38so1112847ana for ; Mon, 03 Dec 2007 13:36:52 -0800 (PST) Message-ID: <475476EA.8030701@codemonkey.ws> Date: Mon, 03 Dec 2007 15:36:42 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O References: <11966765602186@bull.net> <47544588.10700@codemonkey.ws> <1196709044.5587.20.camel@frecb07144> <200712031916.18409.paul@codesourcery.com> In-Reply-To: <200712031916.18409.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Cc: Laurent Vivier Paul Brook wrote: >> 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). >> >> 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) >> > > This seems rather pointless, given a user can just use a linux-AIO librt > instead. > Not at all. linux-aio is the only interface that allows you to do asynchronous fdsync which simulates a barrier which allows for an ordered queue. I have a patch that uses linux-aio for the virtio-blk driver I'll be posting tomorrow and I'm extremely happy with the results. In recent kernels, you can use an eventfd interface along with linux-aio so that polling is unnecessary. Along with O_DIRECT and the preadv/pwritev interface, you can make a block backend in userspace that performs just as well as if it were in the kernel. The posix-aio interface simply doesn't provide a mechanism to do these things. Regards, Anthony Liguori > Paul > > > >