From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiVeu-0002sR-Sx for qemu-devel@nongnu.org; Tue, 01 Sep 2009 11:52:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiVeq-0002qK-HZ for qemu-devel@nongnu.org; Tue, 01 Sep 2009 11:52:36 -0400 Received: from [199.232.76.173] (port=50723 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiVeq-0002qE-3l for qemu-devel@nongnu.org; Tue, 01 Sep 2009 11:52:32 -0400 Received: from verein.lst.de ([213.95.11.210]:45897) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MiVeo-0007in-H9 for qemu-devel@nongnu.org; Tue, 01 Sep 2009 11:52:30 -0400 Date: Tue, 1 Sep 2009 17:52:28 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 0/3] block: Handle multiple write requests at once Message-ID: <20090901155228.GA21781@lst.de> References: <1251813112-17408-1-git-send-email-kwolf@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1251813112-17408-1-git-send-email-kwolf@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Tue, Sep 01, 2009 at 03:51:49PM +0200, Kevin Wolf wrote: > virtio often issues multiple requests in a row, but each one independently. If > the block drivers knew all of the requests, they could optimize the way they > handle the requests. See the description of patch 3 for how qcow2 can use this > to avoid unnecessary writes to the disk. I think this interface is extremly awkward and the layering is wrong. Everyone benefits from having one large instead of multiple small requests, so if we do get multiple sequential write requests we should always merged it at a high level even before starting to issue AIO, e.g. do it all in virtio-blk. Of course using a sane filesystem in the guest would also fix it, but the point of virtualization is at least partially to keep all that old crap working nicely.