From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzaTY-0003lE-LW for qemu-devel@nongnu.org; Tue, 04 Dec 2007 11:18:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzaTX-0003kn-J6 for qemu-devel@nongnu.org; Tue, 04 Dec 2007 11:18:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzaTW-0003kk-Vv for qemu-devel@nongnu.org; Tue, 04 Dec 2007 11:18:23 -0500 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzaTW-0004ck-Lc for qemu-devel@nongnu.org; Tue, 04 Dec 2007 11:18:22 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lB4GIJrG027378 for ; Tue, 4 Dec 2007 11:18:19 -0500 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lB4GII5g003688 for ; Tue, 4 Dec 2007 11:18:18 -0500 Received: from zweiblum.travel.kraxel.org (vpn-4-53.str.redhat.com [10.32.4.53]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id lB4GIHIG028738 for ; Tue, 4 Dec 2007 11:18:17 -0500 Message-ID: <47557DC8.7080206@redhat.com> Date: Tue, 04 Dec 2007 17:18:16 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O References: <11966765602186@bull.net> <4753D920.4060500@bellard.org> <1196677804.5275.5.camel@frecb07144> <475426C7.20503@codemonkey.ws> <20071203170800.GC3797@implementation> <47544588.10700@codemonkey.ws> <1196709044.5587.20.camel@frecb07144> <47547163.1020604@redhat.com> <47547753.2050101@codemonkey.ws> <4755545E.6090609@redhat.com> <47556C2F.1010304@codemonkey.ws> In-Reply-To: <47556C2F.1010304@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 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 Anthony Liguori wrote: > Gerd Hoffmann wrote: Hi, > I really want to use readv/writev though. With virtio, we get a > scatter/gather list for each IO request. Yep, I've also missed pwritev (or whatever that syscall would be named). > Once I post the virtio-blk driver, I'll follow up a little later with > some refactoring of the block device layers. I think it can be made > much simpler while still remaining asynchronous. > >> IMHO the only alternative to that scheme would be to turn the block >> drivers in some kind of remapping drivers for the various file formats >> which don't actually perform the I/O. Then you can handle the actual >> I/O in a generic way using whatever API is available, be it posix-aio, >> linux-aio or slow-sync-io. > > That's part of my plan. Oh, cool. Can you also turn them into a sane shared library while being at it? The current approach to compile it once for qemu and once for qemu-img with -DQEMU_TOOL isn't that great. But if you factor out the actual I/O the block-raw.c code should have no need to mess with qemu internals any more and become much cleaner and simpler ... cheers, Gerd