Received: from eggs.gnu.org ([140.186.70.92]:49149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmAEL-0006rl-IQ for qemu-devel@nongnu.org; Wed, 27 Jul 2011 15:57:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmAEK-0006Jk-Qt for qemu-devel@nongnu.org; Wed, 27 Jul 2011 15:57:21 -0400 Received: from verein.lst.de ([213.95.11.211]:34915 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmAEK-0006JH-GV for qemu-devel@nongnu.org; Wed, 27 Jul 2011 15:57:20 -0400 Date: Wed, 27 Jul 2011 21:57:19 +0200 From: Christoph Hellwig Message-ID: <20110727195718.GA16212@lst.de> References: <1311791126-11383-1-git-send-email-freddy77@gmail.com> <1311791126-11383-2-git-send-email-freddy77@gmail.com> <20110727183122.GA14736@lst.de> <77083DC7-E37C-4B44-9A59-DB19E34D20E2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77083DC7-E37C-4B44-9A59-DB19E34D20E2@gmail.com> Subject: Re: [Qemu-devel] [PATCH 1/2] linux aio: support flush operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frediano Ziglio Cc: Kevin Wolf , Christoph Hellwig , "qemu-devel@nongnu.org" On Wed, Jul 27, 2011 at 09:52:51PM +0200, Frediano Ziglio wrote: > > > > Yes! Not at kernel level :-) In that case we have a bad error handling problem somewhere in qemu. the IOCB_CMD_FDSYNC aio opcode will always return EINVAL currently, and we really should have cought that somewhere in qemu. > Thanks. I'll try to port misaligned access to Linux AIO. Also I'll add some comments on code to avoid somebody do the same mistache I did. It's direct I/O code in general that doesn't handle misaligned access. Given that we should never get misaligned I/O from guests I just didn't bother duplicating the read-modify-write code for that code path as well. > Mainly however -k qemu-img and aio=native in blockdev options are silently ignored if nocache is not enabled. Maybe we should indeed error out instead. Care to prepare a patch for that? > Also I notice that combining XFS, Linux AIO, O_DIRECT and O_DSYNC give impressive performance but currently there is no way to specify all that flags together cause nocache enable O_DIRECT while O_DSYNC is enabled with writethrough. Indeed. This has come up a few times, and actually is a mostly trivial task. Maybe we should give up waiting for -blockdev and separate cache mode settings and allow a nocache-writethrough or similar mode now? It's going to be around 10 lines of code + documentation.