From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrwsN-0001EC-TT for qemu-devel@nongnu.org; Thu, 09 Apr 2009 12:13:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrwsI-0001BT-UI for qemu-devel@nongnu.org; Thu, 09 Apr 2009 12:13:15 -0400 Received: from [199.232.76.173] (port=44719 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrwsI-0001BL-O5 for qemu-devel@nongnu.org; Thu, 09 Apr 2009 12:13:10 -0400 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:57084) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1LrwsI-0000Ie-BH for qemu-devel@nongnu.org; Thu, 09 Apr 2009 12:13:10 -0400 Received: from samy by const with local (Exim 4.69) (envelope-from ) id 1LrwsC-0003tt-9W for qemu-devel@nongnu.org; Thu, 09 Apr 2009 18:13:06 +0200 Date: Thu, 9 Apr 2009 18:13:02 +0200 From: Samuel Thibault Subject: Re: [Qemu-devel] buffer alignment for block backends Message-ID: <20090409161301.GK5457@const.bordeaux.inria.fr> References: <49DCA80A.1020808@eu.citrix.com> <49DCF2C0.9070704@codemonkey.ws> <49DDC66F.2000404@eu.citrix.com> <49DDF3FF.8050706@codemonkey.ws> <49DDF877.8090805@eu.citrix.com> <49DDFE1A.9040202@redhat.com> <20090409152107.GE5457@const.bordeaux.inria.fr> <49DE193B.50703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49DE193B.50703@redhat.com> 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 Gerd Hoffmann, le Thu 09 Apr 2009 17:50:19 +0200, a écrit : > On 04/09/09 17:21, Samuel Thibault wrote: > >Gerd Hoffmann, le Thu 09 Apr 2009 15:54:34 +0200, a écrit : > >>On 04/09/09 15:30, Stefano Stabellini wrote: > >>>The userspace\kernelspace distinction does not make much sense in > >>>minios, but yes it provides an interface to communicate with blkback in > >>>dom0. This interface is used by block-vbd in qemu instead of > >>>block-raw-posix when run in minios. > >>Sit back, look again. Do you really need it being page-aligned? > > > >Page aligned is an optimization which comes for free when you can > >already choose the alignment. > > Ok, so you don't have to. > > Does it have an effect positive actually? i.e. do you have requests > which would fit into one page but actually span two due to the misalignment? I/O with small files often fit in just one page. If they're never aligned the amount of grants to transfer is doubled. > At least when watching the linux kernel access pattern I see larger > requests being page aligned anyway. > Probably page cache reads and writes. Yes, that's what I meant in another mail. Usually, I/O will already be aligned. That's not a reason for not trying to optimize other cases. Samuel