From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YspCc-0004uC-Rd for qemu-devel@nongnu.org; Thu, 14 May 2015 05:13:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YspCZ-0001f3-2G for qemu-devel@nongnu.org; Thu, 14 May 2015 05:13:14 -0400 Message-ID: <5554671F.3030901@redhat.com> Date: Thu, 14 May 2015 11:13:03 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430746944-27347-1-git-send-email-den@openvz.org> <20150511150817.GK16270@stefanha-thinkpad.redhat.com> <5550D3B5.2050703@openvz.org> <5550DD2D.8000407@odin.com> <20150512100155.GB11497@stefanha-thinkpad.redhat.com> <5551D39E.1020902@odin.com> <5551DA21.7020105@redhat.com> <20150513154342.GB24352@stefanha-thinkpad.redhat.com> In-Reply-To: <20150513154342.GB24352@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Dmitry Monakhov , qemu-block@nongnu.org, Stefan Hajnoczi , "Denis V. Lunev" , qemu-devel@nongnu.org On 13/05/2015 17:43, Stefan Hajnoczi wrote: > A 64 MB buffer was given in the pwrite() call. > > The first and the last 128-page write requests may have partial > pages, but why should the rest not use fully aligned 1024 sector > writes? > > Maybe the buffer is split by the max sectors per request before > the alignment requirements are considered. It would be more > efficient to first split off the unaligned parts. Sounds like this could be it---then it's very similar to the issue fixed by kernel commit c6e666345e1b (block: split discard into aligned requests, 2012-08-02). Paolo