From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiWiC-0004Tn-St for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:00:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiWi8-0004KP-9T for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:00:04 -0400 Received: from [199.232.76.173] (port=55971 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiWi7-0004Jl-Iv for qemu-devel@nongnu.org; Tue, 01 Sep 2009 12:59:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54424) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiWi6-0002q6-Hq for qemu-devel@nongnu.org; Tue, 01 Sep 2009 12:59:58 -0400 Message-ID: <4A9D5306.9010005@redhat.com> Date: Tue, 01 Sep 2009 19:59:50 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/3] block: Handle multiple write requests at once References: <1251813112-17408-1-git-send-email-kwolf@redhat.com> <20090901155228.GA21781@lst.de> In-Reply-To: <20090901155228.GA21781@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Kevin Wolf , qemu-devel@nongnu.org On 09/01/2009 06:52 PM, Christoph Hellwig wrote: > 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. > Can you explain why? > 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. > I don't think we should merge requests for the guest. If it issued multiple requests, that's what it wants. I see two benefits to multiwrite: - handle layout issues in qcow2 (so we can allocate for all the requests, then submit them in parallel) - submit multiple requests at once for linux-aio -- error compiling committee.c: too many arguments to function