migration: introduce page flipping capability
cover migration: introduce page flipping capability
This series is extracted from the lastest localhost migration with side channel for ram patch set with comments from Paolo fixed. Send it separately according to his suggestion.
Localhost migration with side channel for ram:
http://lists.gnu.org/archive/html/qemu-devel/2013-10/msg02787.html
Lei Li (3):
QAPI: introduce magration capability unix_page_flipping
migration: add migrate_unix_page_flipping() qmp-command.hx: add missing docs for migration capabilites
PATCH 1/3 QAPI: introduce magration capability unix_page_flipping
Introduce unix_page_flipping to MigrationCapability for localhost migration.
--- qapi-schema.json | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
qapi-schema.json +9 -1
@@ -661,10 +661,18 @@ # @auto-converge: If enabled, QEMU will automatically throttle down the guest # to speed up convergence of RAM migration. (since 1.6) # +# @unix-page-flipping: If enabled, QEMU can optimize migration when the +# destination is a QEMU process that runs on the same host as +# the source (as is the case for live upgrade). If the migration +# transport is a Unix socket, QEMU will flip RAM pages directly to +# the destination, so that memory is only allocated twice for the +# source and destination processes. Disabled by default. (since 1.8) +# # Since: 1.2 ## { 'enum': 'MigrationCapability', - 'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks'] } + 'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks', + 'unix-page-flipping'] } ## # @MigrationCapabilityStatus
Signature · 1 line
1.7.7.6
PATCH 2/3 migration: add migrate_unix_page_flipping()
In reply to Lei LiAdd migrate_unix_page_flipping() to check if MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled.
--- include/migration/migration.h | 3 +++ migration.c | 9 +++++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
include/migration/migration.h +3 -0
@@ -131,10 +131,13 @@ void migrate_add_blocker(Error *reason);void migrate_del_blocker (Error *reason);bool migrate_rdma_pin_all (void ); +bool migrate_zero_blocks (void );bool migrate_auto_converge (void ); +bool migrate_unix_page_flipping (void ); +int xbzrle_encode_buffer (uint8_t *old_buf,uint8_t *new_buf,int slen,uint8_t *dst,int dlen);int xbzrle_decode_buffer (uint8_t *src,int slen,uint8_t *dst,int dlen);
migration.c +9 -0
@@ -541,6 +541,15 @@ int64_t migrate_xbzrle_cache_size(void)return s->xbzrle_cache_size; } +bool migrate_unix_page_flipping (void ) +{ +MigrationState *s; + + s =migrate_get_current (); + +return s->enabled_capabilities[MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING ]; +} +/* migration thread support */ static void *migration_thread (void *opaque)
Signature · 1 line
1.7.7.6
PATCH 3/3 qmp-command.hx: add missing docs for migration capabilites
In reply to Lei Li--- qmp-commands.hx | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
qmp-commands.hx +8 -0
@@ -2898,6 +2898,10 @@ migrate-set-capabilities Enable/Disable migration capabilities - "xbzrle": XBZRLE support +- "x-rdma-pin-all": Pin all pages during RDMA support +- "zero-blocks": Compress zero blocks during block migration +- "auto-converge": Block VCPU to help convergence of migration +- "unix-page-flipping": Page flipping for live QEMU upgrade Arguments:
@@ -2922,6 +2926,10 @@ Query current migration capabilities - "capabilities": migration capabilities state - "xbzrle" : XBZRLE state (json-bool) + - "x-rdma-pin-all": RDMA state (json-bool) + - "zero-blocks": zero-blocks state (json-bool) + - "auto-converge": Auto converge state (json-bool) + - "unix-page-flipping": Page flipping state (json-bool) Arguments:
Signature · 1 line
1.7.7.6
Il 25/10/2013 15:59, Lei Li ha scritto:
Quoted 4 lines
This series is extracted from the lastest localhost migration with side channel for ram patch set with comments from Paolo fixed. Send it separately according to his suggestion.
Quoted 8 lines
Localhost migration with side channel for ram:
http://lists.gnu.org/archive/html/qemu-devel/2013-10/msg02787.htmlLei Li (3):
QAPI: introduce magration capabilityunix_page_flipping
migration: addmigrate_unix_page_flipping()qmp-command.hx: add missing docs for migration capabilites
Sorry for the misunderstanding---I meant squashing them together in one patch, not separating the series.
Paolo