From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMGDa-00057n-3W for qemu-devel@nongnu.org; Wed, 18 Sep 2013 07:46:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMGDT-0002m8-H5 for qemu-devel@nongnu.org; Wed, 18 Sep 2013 07:46:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMGDT-0002m0-90 for qemu-devel@nongnu.org; Wed, 18 Sep 2013 07:46:43 -0400 Message-ID: <523992AD.30507@redhat.com> Date: Wed, 18 Sep 2013 13:46:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1376554447-28638-1-git-send-email-famz@redhat.com> <1376554447-28638-2-git-send-email-famz@redhat.com> <20130904123504.GB12733@stefanha-thinkpad.redhat.com> In-Reply-To: <20130904123504.GB12733@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/2] block: allow live commit of active image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, jcody@redhat.com, Fam Zheng , qemu-devel@nongnu.org, stefanha@redhat.com Il 04/09/2013 14:35, Stefan Hajnoczi ha scritto: > Changing from 512 KB to 64 KB can affect performance. 8 times as many > iops may be issued to copy data. > > Also, the image's cluster size should really be taken into account. > Otherwise additional inefficiency will be suffered when we populate a > 128 KB cluster with a COMMIT_BUFFER_SECTORS (64 KB) write only to > overwrite the remaining part in the next loop iteration. > > This can be solved by setting dirty bitmap granularity to cluster size > or 64 KB minimum *and* finding continuous runs of dirty bits so larger > I/Os can be performed by the main loop (up to 512 KB in one request). At this point, you're basically reinventing the algorithms in block/mirror.c (even more than this patch is already doing :)). I wonder if commit-to-active should be internally a separate kind of job, implemented in block/mirror.c instead of block/commit.c. Paolo