From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD8hc-0001qz-Uc for qemu-devel@nongnu.org; Wed, 15 Jun 2016 07:09:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD8hb-0003xw-P7 for qemu-devel@nongnu.org; Wed, 15 Jun 2016 07:09:44 -0400 Date: Wed, 15 Jun 2016 12:09:30 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20160615110929.GA3036@work-vm> References: <1465917916-22348-1-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465917916-22348-1-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 0/9] major rework of drive-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Kevin Wolf , vsementsov@virtuozzo.com, Fam Zheng , Jeff Cody , Max Reitz , Stefan Hajnoczi * Denis V. Lunev (den@openvz.org) wrote: > Block commit of the active image to the backing store on a slow disk > could never end. For example with the guest with the following loop > inside > while true; do > dd bs=1k count=1 if=/dev/zero of=x > done > running above slow storage could not complete the operation with a > resonable amount of time: > virsh blockcommit rhel7 sda --active --shallow > virsh qemu-monitor-event > virsh qemu-monitor-command rhel7 \ > '{"execute":"block-job-complete",\ > "arguments":{"device":"drive-scsi0-0-0-0"} }' > virsh qemu-monitor-event > Completion event is never received. > > This problem could not be fixed easily with the current architecture. We > should either prohibit guest writes (making dirty bitmap dirty) or switch > to the sycnchronous scheme. > > This series switches driver mirror to synch scheme. Actually we can have > something more intelligent and switch to sync mirroring just after > the first pass over the bitmap. Though this could be done relatively > easily during discussion. The most difficult things are here. Some random thoughts: a) People have been asking for post-copy for block storage, and this solves the same problem a different way. b) I guess the other way is to turn on write-throttling - that would also guarantee the rate at which writes happen. c) Don't you end up with something verymuch like what the colo block replication guys have ended up with? Dave > The set also adds some performance improvements dealing with > known-to-be-zero areas. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Vladimir Sementsov-Ogievskiy > CC: Stefan Hajnoczi > CC: Fam Zheng > CC: Kevin Wolf > CC: Max Reitz > CC: Jeff Cody > CC: Eric Blake > > Denis V. Lunev (9): > mirror: fix calling of blk_aio_pwritev/blk_aio_preadv > mirror: create mirror_dirty_init helper for mirror_run > mirror: optimize dirty bitmap filling in mirror_run a bit > mirror: efficiently zero out target > mirror: improve performance of mirroring of empty disk > block: pass qiov into before_write notifier > mirror: allow to save buffer for QEMUIOVector in MirrorOp > mirror: use synch scheme for drive mirror > mirror: replace bdrv_dirty_bitmap with plain hbitmap > > block/io.c | 12 +- > block/mirror.c | 290 +++++++++++++++++++++++++++++++++++----------- > include/block/block_int.h | 1 + > 3 files changed, 229 insertions(+), 74 deletions(-) > > -- > 2.5.0 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK