From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JoJs5-0000Ng-EB for qemu-devel@nongnu.org; Tue, 22 Apr 2008 10:53:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JoJs3-0000N3-U3 for qemu-devel@nongnu.org; Tue, 22 Apr 2008 10:53:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoJs3-0000Mv-Ro for qemu-devel@nongnu.org; Tue, 22 Apr 2008 10:53:23 -0400 Received: from py-out-1112.google.com ([64.233.166.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JoJs3-0006Di-KE for qemu-devel@nongnu.org; Tue, 22 Apr 2008 10:53:23 -0400 Received: by py-out-1112.google.com with SMTP id u52so3492841pyb.10 for ; Tue, 22 Apr 2008 07:53:21 -0700 (PDT) Message-ID: <480DFBD9.4030802@codemonkey.ws> Date: Tue, 22 Apr 2008 09:53:13 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/3] Refactor AIO interface to allow other AIO implementations References: <20080417200024.GC11916@redhat.com> <20080418124319.GC25089@shareable.org> <4808BCF3.3060200@us.ibm.com> <4808CD10.8010609@qumranet.com> <20080420154943.GB14268@shareable.org> <480B8EDC.6060507@qumranet.com> <20080420233913.GA23292@shareable.org> <480C36A3.6010900@qumranet.com> <20080421121028.GD4193@shareable.org> <480D9D74.5070801@qumranet.com> <20080422142847.GC4849@shareable.org> In-Reply-To: <20080422142847.GC4849@shareable.org> 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, kvm-devel@lists.sourceforge.net, Marcelo Tosatti Jamie Lokier wrote: > Avi Kivity wrote: > >>> And video streaming on some embedded devices with no MMU! (Due to the >>> page cache heuristics working poorly with no MMU, sustained reliable >>> streaming is managed with O_DIRECT and the app managing cache itself >>> (like a database), and that needs AIO to keep the request queue busy. >>> At least, that's the theory.) >>> >> Could use threads as well, no? >> > > Perhaps. This raises another point about AIO vs. threads: > > If I submit sequential O_DIRECT reads with aio_read(), will they enter > the device read queue in the same order, and reach the disk in that > order (allowing for reordering when worthwhile by the elevator)? > There's no guarantee that any sort of order will be preserved by AIO requests. The same is true with writes. This is what fdsync is for, to guarantee ordering. Regards, Anthony Liguori