Received: from eggs.gnu.org ([2001:4830:134:3::10]:50925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1tUE-0001Fc-3j for qemu-devel@nongnu.org; Wed, 02 Nov 2016 07:13:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1tUC-0003TX-Ks for qemu-devel@nongnu.org; Wed, 02 Nov 2016 07:13:42 -0400 Date: Wed, 2 Nov 2016 11:13:32 +0000 From: Stefan Hajnoczi Message-ID: <20161102111332.GC4693@stefanha-x1.localdomain> References: <1471343175-14945-1-git-send-email-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eRtJSFbw+EEWtPj3" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] ping Re: [PATCH 00/18] Dirty bitmaps postcopy migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, pbonzini@redhat.com, armbru@redhat.com, eblake@redhat.com, famz@redhat.com, amit.shah@redhat.com, quintela@redhat.com, mreitz@redhat.com, kwolf@redhat.com, peter.maydell@linaro.org, dgilbert@redhat.com, den@openvz.org, jsnow@redhat.com, lirans@il.ibm.com --eRtJSFbw+EEWtPj3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 25, 2016 at 04:04:35PM +0300, Vladimir Sementsov-Ogievskiy wrot= e: > ping >=20 > For now there are some notes mostly about accessory patches. What about > migration itself? Is it ok? Has it a chance of being merged one day? This series mostly touches migration/ code. Juan or DaveG? > 16.08.2016 13:25, Vladimir Sementsov-Ogievskiy wrote: > > v2: > > some bugs fixed, iotests a bit changed and merged into one test. > > based on block-next (https://github.com/XanClic/qemu/commits/block-next) > > clone: tag postcopy-v2 from https://src.openvz.org/scm/~vsementsov/qemu= =2Egit > > online: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=3D= refs%2Ftags%2Fpostcopy-v2 > >=20 > > v1: > >=20 > > These series are derived from my 'Dirty bitmaps migration' series. The > > core idea is switch to postcopy migration and drop usage of meta > > bitmaps. > >=20 > > These patches provide dirty bitmap postcopy migration feature. Only > > named dirty bitmaps are to be migrated. Migration may be enabled using > > migration capabilities. > >=20 > > The overall method (thanks to John Snow): > >=20 > > 1. migrate bitmaps meta data in .save_live_setup > > - create/find related bitmaps on target > > - disable them > > - create successors (anonimous children) only for enabled migrated > > bitmaps > > 2. do nothing in precopy stage > > 3. just before target vm start: enable successors, created in (1) > > 4. migrate bitmap data > > 5. reclaime bitmaps (merge successors to their parents) > > 6. enable bitmaps (only bitmaps, which was enabled in source) > >=20 > >=20 > > Some patches are unchnaged from (v7) of 'Dirty bitmaps migration' > > (DBMv7). I've left Reviewed-by's for them, if you don't like it, say me > > and I'll drop them in the following version. > >=20 > > So, relatively to last DBMv7: > >=20 > > 01-04: new patches, splitting common postcopy migration out of ram > > postcopy migration > > 05: equal to DBMv7.05 > > 06: new > > 07: equal to DBMv7.06 > > 08: new > > 09: equal to DBMv7.07 > > 10: new > > 11: derived from DBMv7.08, see below > > 12-15: equal to DBMv7.09-12 > > 16: derived from DBMv7.13 > > - switch from fifo to socket, as postcopy don't work with fifo > > for now > > - change parameters: size, granularity, regions > > - add time.sleep, to wait for postcopy migration phase (bad > > temporary solution. > > - drop Reviewed-by > > 17: new > >=20 > > 11: the core patch of the series, it is derived from > > [DBMv7.08: migration: add migration_block-dirty-bitmap.c] > > There are a lot of changes related to switching from precopy to > > postcopy, but functions related to migration stream itself > > (structs, send/load sequences) are mostly unchnaged. > >=20 > > So, changes, to switch from precopy to postcopy: > > - removed all staff related to meta bitmaps and dirty phase!!! > > - add dirty_bitmap_mig_enable_successors, and call it before > > target vm start in loadvm_postcopy_handle_run > > - add enabled_bitmaps list of bitmaps for > > dirty_bitmap_mig_enable_successors > >=20 > > - enabled flag is send with start bitmap chunk instead of > > completion chunk > > - sectors_per_chunk is calculated directly from CHUNK_SIZE, not > > using meta bitmap granularity > >=20 > > - dirty_bitmap_save_iterate: remove dirty_phase, move bulk_phase > > to postcopy stage > > - dirty_bitmap_save_pending: remove dirty phase related pending, > > switch pending to non-postcopyable > > - dirty_bitmap_load_start: get enabled flag and prepare > > successors for enabled bitmaps, also add them to > > enabled_bitmaps list > > - dirty_bitmap_load_complete: for enabled bitmaps: merge them > > with successors and enable > >=20 > > - savevm handlers: > > * remove separate savevm_dirty_bitmap_live_iterate_handlers s= tate > > (it was bad idea, any way), and move its save_live_iterate = to > > savevm_dirty_bitmap_handlers > > * add is_active_iterate savevm handler, which allows iteratio= ns > > only in postcopy stage (after stopping source vm) > > * add has_postcopy savevm handler. (ofcourse, just returning = true) > > * use save_live_complete_postcopy instead of > > save_live_complete_precopy > >=20 > > Other changes: > > - some debug output changed > > - remove MIN_LIVE_SIZE, is_live_iterative and related staff (it > > was needed to omit iterations if bitmap data is small, possib= ly > > this should be reimplemented) > >=20 > > Vladimir Sementsov-Ogievskiy (18): > > migration: add has_postcopy savevm handler > > migration: fix ram_save_pending > > migration: split common postcopy out of ram postcopy > > migration: introduce postcopy-only pending > > block: add bdrv_next_dirty_bitmap() > > block: add bdrv_dirty_bitmap_enable_successor() > > qapi: add dirty-bitmaps migration capability > > block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor > > migration: include migrate_dirty_bitmaps in migrate_postcopy > > migration/qemu-file: add qemu_put_counted_string() > > migration: add is_active_iterate handler > > migration: add postcopy migration of dirty bitmaps > > iotests: maintain several vms in test > > iotests: add add_incoming_migration to VM class > > qapi: add md5 checksum of last dirty bitmap level to query-block > > iotests: add default node-name > > iotests: add dirty bitmap migration test 117 > > iotests: add dirty bitmap postcopy test > >=20 > > block/dirty-bitmap.c | 26 ++ > > include/block/dirty-bitmap.h | 6 + > > include/migration/block.h | 1 + > > include/migration/migration.h | 6 + > > include/migration/qemu-file.h | 2 + > > include/migration/vmstate.h | 7 +- > > include/qemu/hbitmap.h | 8 + > > include/sysemu/sysemu.h | 5 +- > > migration/Makefile.objs | 2 +- > > migration/block-dirty-bitmap.c | 699 ++++++++++++++++++++++++++++++++= +++++++++ > > migration/block.c | 7 +- > > migration/migration.c | 66 ++-- > > migration/postcopy-ram.c | 4 +- > > migration/qemu-file.c | 13 + > > migration/ram.c | 19 +- > > migration/savevm.c | 56 +++- > > migration/trace-events | 2 +- > > qapi-schema.json | 4 +- > > qapi/block-core.json | 5 +- > > tests/qemu-iotests/169 | 134 ++++++++ > > tests/qemu-iotests/169.out | 5 + > > tests/qemu-iotests/group | 2 + > > tests/qemu-iotests/iotests.py | 21 +- > > util/hbitmap.c | 8 + > > vl.c | 1 + > > 25 files changed, 1055 insertions(+), 54 deletions(-) > > create mode 100644 migration/block-dirty-bitmap.c > > create mode 100755 tests/qemu-iotests/169 > > create mode 100644 tests/qemu-iotests/169.out > >=20 >=20 >=20 > --=20 > Best regards, > Vladimir >=20 --eRtJSFbw+EEWtPj3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYGcpcAAoJEJykq7OBq3PI3IMIAIYgrQTPgpufr0kUgInn4Wjy sg4sAZQ2BeTSRnWAgTQyjI6hnNeCB9StJCRTTt9JVEvFpCJ/aOTs3wLWbP/DshS5 mp8n7zGFbRwsw9Re/GycIeosmlm5TLRxdqWZ0S7yggwdmHpVzYvT8SoCsL5YhcY5 0q7rlI5FZFOhlOgbSE+1hE9+2vJ/UPp2trFRuTzrsYqmfRrLAlZcZZFuex2qgyQe 9lm8eaXyhnmNpn7S3rECq8s53zTNuLrszrA68WoeRAO4PsnQiNsSy6BogjYcdgzM yVpSLc4Xngt1X1+J1XragYNmM3HGSRIxihUjob1qb19g1EPY2X4g3bxIENMhezk= =2xjF -----END PGP SIGNATURE----- --eRtJSFbw+EEWtPj3--