[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 8/9] mirror: use synch scheme for drive mirror
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH 8/9] mirror: use synch scheme for drive mirror |
Date: |
Tue, 14 Jun 2016 22:18:10 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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=1k count=1 if=/dev/zero of=x
> 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.
>
> 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.
s/sycnchronous/synchronous/
>
> 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.
>
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 <address@hidden>
> Reviewed-by: Vladimir Sementsov-Ogievskiy<address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> CC: Fam Zheng <address@hidden>
> CC: Kevin Wolf <address@hidden>
> CC: Max Reitz <address@hidden>
> CC: Jeff Cody <address@hidden>
> CC: Eric Blake <address@hidden>
> ---
> block/mirror.c | 78
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 78 insertions(+)
>
I'll leave the actual idea to others to review, because there may be
some ramifications that I'm not thinking of.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, (continued)
- [Qemu-block] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Denis V. Lunev, 2016/06/14
- Re: [Qemu-block] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Eric Blake, 2016/06/14
- Re: [Qemu-block] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Stefan Hajnoczi, 2016/06/15
- Re: [Qemu-block] [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Denis V. Lunev, 2016/06/15
- Re: [Qemu-block] [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Stefan Hajnoczi, 2016/06/16
- Re: [Qemu-block] [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Eric Blake, 2016/06/16
- Re: [Qemu-block] [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk, Stefan Hajnoczi, 2016/06/17
[Qemu-block] [PATCH 7/9] mirror: allow to save buffer for QEMUIOVector in MirrorOp, Denis V. Lunev, 2016/06/14
[Qemu-block] [PATCH 8/9] mirror: use synch scheme for drive mirror, Denis V. Lunev, 2016/06/14
[Qemu-block] [PATCH 6/9] block: pass qiov into before_write notifier, Denis V. Lunev, 2016/06/14
[Qemu-block] [PATCH 9/9] mirror: replace bdrv_dirty_bitmap with plain hbitmap, Denis V. Lunev, 2016/06/14
Re: [Qemu-block] [PATCH 0/9] major rework of drive-mirror, Kevin Wolf, 2016/06/15