From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD2HV-0004PR-5m for qemu-devel@nongnu.org; Wed, 15 Jun 2016 00:18:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD2HS-00032X-Po for qemu-devel@nongnu.org; Wed, 15 Jun 2016 00:18:20 -0400 References: <1465917916-22348-1-git-send-email-den@openvz.org> <1465917916-22348-9-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <5760D702.208@redhat.com> Date: Tue, 14 Jun 2016 22:18:10 -0600 MIME-Version: 1.0 In-Reply-To: <1465917916-22348-9-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ixPTeHtImDWAXhkOp43ajHQW8suEsgDV1" Subject: Re: [Qemu-devel] [PATCH 8/9] mirror: use synch scheme for drive mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: vsementsov@virtuozzo.com, Stefan Hajnoczi , Fam Zheng , Kevin Wolf , Max Reitz , Jeff Cody This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ixPTeHtImDWAXhkOp43ajHQW8suEsgDV1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/14/2016 09:25 AM, Denis V. Lunev 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=3D1k count=3D1 if=3D/dev/zero of=3Dx > done > running above slow storage could not complete the operation with a s/with/within/ > resonable amount of time: s/resonable/reasonable/ > 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. >=20 > This problem could not be fixed easily with the current architecture. W= e > should either prohibit guest writes (making dirty bitmap dirty) or swit= ch > to the sycnchronous scheme. s/sycnchronous/synchronous/ >=20 > This patch implements the latter. It adds mirror_before_write_notify > callback. In this case all data written from the guest is synchnonously= s/synchnonously/synchronously/ > written to the mirror target. Though the problem is solved partially. > We should switch from bdrv_dirty_bitmap to simple hbitmap. This will be= > done in the next patch. >=20 In other words, the mere act of mirroring a guest will now be guest-visible in that the guest is auto-throttled while waiting for the mirroring to be written out. It seems like you would want to be able to opt in or out of this scheme. Is it something that can be toggled mid-operation (try asynchronous, and switch to synchronous if a timeout elapses)? > 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 > --- > block/mirror.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 1 file changed, 78 insertions(+) >=20 I'll leave the actual idea to others to review, because there may be some ramifications that I'm not thinking of. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ixPTeHtImDWAXhkOp43ajHQW8suEsgDV1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXYNcCAAoJEKeha0olJ0NqbQkIAKcePls8Xga5HlrOxLgo4cea uAKGgSwOBGDfWk73mKaGjk7FG/y7Cvk4XRLyL33yMeHA2Hc9AuEE3kxiJUvt9NJz QkFAcxlKw+GOBJ+InEJ9FjP3ugDHk+jiSMD44wmqOVXSrnlc5tbwNuJOKDGrHBL5 aGMIgaxNqpmtojlmgyTSeUPxxQcMyMgsXwhWK5MWntR6lYzZV+nvp7oIgNNs55QS aZx00EZ1uAY5P0fu1g0aKg/DcX6yCibuT1NQ8pWy8DSzY/FDtj/XR7vzEawU1gyu y5Yi9+CnWuNuSKvWcxXAhsctLSzvviHDuySdwgBAQrzMGYOXl6L5ueHjWrFtick= =Od9+ -----END PGP SIGNATURE----- --ixPTeHtImDWAXhkOp43ajHQW8suEsgDV1--