qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] Add ignore-external migration capability
@ 2019-02-04 13:09 Yury Kotov
  2019-02-04 13:09 ` [Qemu-devel] [PATCH v2 1/4] exec: Change RAMBlockIterFunc definition Yury Kotov
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Yury Kotov @ 2019-02-04 13:09 UTC (permalink / raw)
  To: qemu-devel, Eduardo Habkost, Igor Mammedov, Paolo Bonzini,
	Peter Crosthwaite, Richard Henderson, Juan Quintela,
	Dr. David Alan Gilbert, Eric Blake, Markus Armbruster,
	Thomas Huth, Laurent Vivier
  Cc: wrfsh

Hi,

The series adds a migration capability, which allows to skip shared RAM blocks
during the migration. It's useful for fast local migration. E.g. to update QEMU
for the running guests.

Usage example:
1. Start source VM:
   qemu-system-x86 \
     -m 4G \
     -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \
     -numa node,memdev=mem0 \
     -qmp unix:/tmp/qemu-qmp-1.sock,server,nowait \

2. Start target VM:
   qemu-system-x86 \
     -m 4G \
     -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \
     -numa node,memdev=mem0 \
     -qmp unix:/tmp/qemu-qmp-2.sock,server,nowait \
     -incoming defer

3. Enable ignore-external capability on both VMs:
   { "execute": "migrate-set-capabilities" , "arguments":
     { "capabilities": [ { "capability": "x-ignore-external", "state": true } ] } }

4. Start migration.

Another use case I keep in mind is to migrate to file. Usage is very similar.

V1 to V2:
* Keep migration stream compatibility
* Reuse the existing code to ignore unwanted RAMBlocks
* Add capability validation feature
* ignore-external -> ignore-shared

Regards,
Yury

Yury Kotov (5):
  exec: Change RAMBlockIterFunc definition
  migration: Move qemu_ram_foreach_migratable_block to migration code
  migration: Introduce ignore-shared capability
  tests/migration-test: Add a test for ignore-shared capability
  migration: Add capabilities validation

 exec.c                    |  38 ++++++-------
 include/exec/cpu-common.h |   7 +--
 migration/migration.c     |   9 ++++
 migration/migration.h     |  11 +++-
 migration/postcopy-ram.c  |  48 +++++++++--------
 migration/ram.c           |  86 ++++++++++++++++++++++++++----
 migration/rdma.c          |   9 ++--
 migration/savevm.c        | 101 +++++++++++++++++++++++++++++++++++
 qapi/migration.json       |   5 +-
 stubs/ram-block.c         |  15 ++++++
 tests/migration-test.c    | 109 +++++++++++++++++++++++++++++++-------
 util/vfio-helpers.c       |   6 +--
 12 files changed, 361 insertions(+), 83 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-02-12 13:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-04 13:09 [Qemu-devel] [PATCH v2 0/5] Add ignore-external migration capability Yury Kotov
2019-02-04 13:09 ` [Qemu-devel] [PATCH v2 1/4] exec: Change RAMBlockIterFunc definition Yury Kotov
2019-02-11 11:40   ` Dr. David Alan Gilbert
2019-02-04 13:09 ` [Qemu-devel] [PATCH v2 2/4] migration: Introduce ignore-shared capability Yury Kotov
2019-02-11 12:45   ` Dr. David Alan Gilbert
2019-02-11 13:36     ` Yury Kotov
2019-02-11 15:55       ` Dr. David Alan Gilbert
2019-02-04 13:09 ` [Qemu-devel] [PATCH v2 3/4] tests/migration-test: Add a test for " Yury Kotov
2019-02-11 13:17   ` Dr. David Alan Gilbert
2019-02-12 12:49     ` Yury Kotov
2019-02-04 13:09 ` [Qemu-devel] [PATCH v2 4/4] migration: Add capabilities validation Yury Kotov
2019-02-11 13:30   ` Dr. David Alan Gilbert
2019-02-12 13:58     ` Yury Kotov
2019-02-11 11:24 ` [Qemu-devel] [PATCH v2 0/5] Add ignore-external migration capability Yury Kotov
2019-02-11 16:03 ` Dr. David Alan Gilbert
2019-02-11 16:13   ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).