[PATCH v4 for-5.1 00/21] Fix error handling during bitmap postcopy

Vladimir Sementsov-Ogievskiy posted 21 patches 3 years, 9 months ago
Test FreeBSD failed
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200727194236.19551-1-vsementsov@virtuozzo.com
Maintainers: Fam Zheng <fam@euphon.net>, Eric Blake <eblake@redhat.com>, John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Max Reitz <mreitz@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, Juan Quintela <quintela@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
migration/migration.h          |   3 +-
migration/block-dirty-bitmap.c | 470 +++++++++++++++++++++------------
migration/migration.c          |  15 +-
migration/savevm.c             |  37 ++-
tests/qemu-iotests/199         | 250 ++++++++++++++----
tests/qemu-iotests/199.out     |   4 +-
6 files changed, 545 insertions(+), 234 deletions(-)
[PATCH v4 for-5.1 00/21] Fix error handling during bitmap postcopy
Posted by Vladimir Sementsov-Ogievskiy 3 years, 9 months ago
v4:

01: typo in commit msg
07: reword commit msg, add Eric's r-b
10: add Dr. David's r-b
15: add check for buf_size
    use g_autofree (and fix introduced in v3)
    use QEMU_LOCK_GUARD
17: fix commit msg, add Eric's r-b
20-21: add Eric's t-b

Original idea of bitmaps postcopy migration is that bitmaps are non
critical data, and their loss is not serious problem. So, using postcopy
method on any failure we should just drop unfinished bitmaps and
continue guest execution.

However, it doesn't work so. It crashes, fails, it goes to
postcopy-recovery feature. It does anything except for behavior we want.
These series fixes at least some problems with error handling during
bitmaps migration postcopy.

Vladimir Sementsov-Ogievskiy (21):
  qemu-iotests/199: fix style
  qemu-iotests/199: drop extra constraints
  qemu-iotests/199: better catch postcopy time
  qemu-iotests/199: improve performance: set bitmap by discard
  qemu-iotests/199: change discard patterns
  qemu-iotests/199: increase postcopy period
  migration/block-dirty-bitmap: fix dirty_bitmap_mig_before_vm_start
  migration/block-dirty-bitmap: rename state structure types
  migration/block-dirty-bitmap: rename dirty_bitmap_mig_cleanup
  migration/block-dirty-bitmap: move mutex init to dirty_bitmap_mig_init
  migration/block-dirty-bitmap: refactor state global variables
  migration/block-dirty-bitmap: rename finish_lock to just lock
  migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete
  migration/block-dirty-bitmap: keep bitmap state for all bitmaps
  migration/block-dirty-bitmap: relax error handling in incoming part
  migration/block-dirty-bitmap: cancel migration on shutdown
  migration/savevm: don't worry if bitmap migration postcopy failed
  qemu-iotests/199: prepare for new test-cases addition
  qemu-iotests/199: check persistent bitmaps
  qemu-iotests/199: add early shutdown case to bitmaps postcopy
  qemu-iotests/199: add source-killed case to bitmaps postcopy

 migration/migration.h          |   3 +-
 migration/block-dirty-bitmap.c | 470 +++++++++++++++++++++------------
 migration/migration.c          |  15 +-
 migration/savevm.c             |  37 ++-
 tests/qemu-iotests/199         | 250 ++++++++++++++----
 tests/qemu-iotests/199.out     |   4 +-
 6 files changed, 545 insertions(+), 234 deletions(-)

-- 
2.21.0


Re: [PATCH v4 for-5.1 00/21] Fix error handling during bitmap postcopy
Posted by Eric Blake 3 years, 9 months ago
On 7/27/20 2:42 PM, Vladimir Sementsov-Ogievskiy wrote:
> v4:
> 
> 01: typo in commit msg
> 07: reword commit msg, add Eric's r-b
> 10: add Dr. David's r-b
> 15: add check for buf_size
>      use g_autofree (and fix introduced in v3)
>      use QEMU_LOCK_GUARD
> 17: fix commit msg, add Eric's r-b
> 20-21: add Eric's t-b

What timing!  I was literally in the middle of composing my pull request 
when this landed in my inbox; I'll refresh my local contents to pick 
this up (and see if you tweaked anything differently than I did).

Therefore, my pull request is now shifted by an hour or two, but will 
still come today ;)

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Re: [PATCH v4 for-5.1 00/21] Fix error handling during bitmap postcopy
Posted by Vladimir Sementsov-Ogievskiy 3 years, 9 months ago
27.07.2020 22:53, Eric Blake wrote:
> On 7/27/20 2:42 PM, Vladimir Sementsov-Ogievskiy wrote:
>> v4:
>>
>> 01: typo in commit msg
>> 07: reword commit msg, add Eric's r-b
>> 10: add Dr. David's r-b
>> 15: add check for buf_size
>>      use g_autofree (and fix introduced in v3)
>>      use QEMU_LOCK_GUARD
>> 17: fix commit msg, add Eric's r-b
>> 20-21: add Eric's t-b
> 
> What timing!  I was literally in the middle of composing my pull request when this landed in my inbox; I'll refresh my local contents to pick this up (and see if you tweaked anything differently than I did).
> 
> Therefore, my pull request is now shifted by an hour or two, but will still come today ;)
> 

Sorry :). Thanks for your work!

-- 
Best regards,
Vladimir