From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNJfG-0004mp-ER for qemu-devel@nongnu.org; Mon, 16 Feb 2015 06:16:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNJf9-0000M8-Eu for qemu-devel@nongnu.org; Mon, 16 Feb 2015 06:16:34 -0500 Received: from mx2.parallels.com ([199.115.105.18]:54015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNJf9-0008E2-8v for qemu-devel@nongnu.org; Mon, 16 Feb 2015 06:16:27 -0500 Message-ID: <54E1D11E.2040005@openvz.org> Date: Mon, 16 Feb 2015 14:14:38 +0300 From: "Denis V. Lunev" MIME-Version: 1.0 References: <1423244272-24887-1-git-send-email-den@openvz.org> <1423244272-24887-3-git-send-email-den@openvz.org> <20150216105942.GH4079@noname.str.redhat.com> In-Reply-To: <20150216105942.GH4079@noname.str.redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-devel@nongnu.org On 16/02/15 13:59, Kevin Wolf wrote: > Am 06.02.2015 um 18:37 hat Denis V. Lunev geschrieben: >> The following sequence >> int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); >> for (i = 0; i < 100000; i++) >> write(fd, buf, 4096); >> performs 5% better if buf is aligned to 4096 bytes. >> >> The difference is quite reliable. >> >> On the other hand we do not want at the moment to enforce bounce >> buffering if guest request is aligned to 512 bytes. >> >> The patch introduces new concept: minimal memory alignment for bounce >> buffers. Original so called "optimal" value is actually minimal required >> value for aligment. Optimal should be set to page size by default. >> There is no driver which should change this default at the moment. >> >> Signed-off-by: Denis V. Lunev >> CC: Paolo Bonzini >> CC: Kevin Wolf > I don't think the subject lines describes the patch correctly. IIUC, > patch 1 introduces a hard enforcement of page size alignment, and this > patch only loosens it again. > > Perhaps the order of patches should be changed so that min_mem_alignment > is introduced first (without changes in the behaviour), and only then > opt_mem_alignment is increased. > > Kevin ok :)