* [Qemu-devel] [PATCH 1/3] QAPI: introduce magration capability unix_page_flipping
2013-10-25 14:59 [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability Lei Li
@ 2013-10-25 14:59 ` Lei Li
2013-10-25 14:59 ` [Qemu-devel] [PATCH 2/3] migration: add migrate_unix_page_flipping() Lei Li
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Lei Li @ 2013-10-25 14:59 UTC (permalink / raw)
To: qemu-devel; +Cc: lagarcia, pbonzini, Lei Li, aliguori, quintela
Introduce unix_page_flipping to MigrationCapability for localhost
migration.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
qapi-schema.json | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 60f3fd1..7cb88af 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -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
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/3] migration: add migrate_unix_page_flipping()
2013-10-25 14:59 [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability Lei Li
2013-10-25 14:59 ` [Qemu-devel] [PATCH 1/3] QAPI: introduce magration capability unix_page_flipping Lei Li
@ 2013-10-25 14:59 ` Lei Li
2013-10-25 14:59 ` [Qemu-devel] [PATCH 3/3] qmp-command.hx: add missing docs for migration capabilites Lei Li
2013-10-25 15:13 ` [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability Paolo Bonzini
3 siblings, 0 replies; 5+ messages in thread
From: Lei Li @ 2013-10-25 14:59 UTC (permalink / raw)
To: qemu-devel; +Cc: lagarcia, pbonzini, Lei Li, aliguori, quintela
Add migrate_unix_page_flipping() to check if
MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
include/migration/migration.h | 3 +++
migration.c | 9 +++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 140e6b4..7e5d01a 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -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);
diff --git a/migration.c b/migration.c
index 2b1ab20..4ac466b 100644
--- a/migration.c
+++ b/migration.c
@@ -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)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 3/3] qmp-command.hx: add missing docs for migration capabilites
2013-10-25 14:59 [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability Lei Li
2013-10-25 14:59 ` [Qemu-devel] [PATCH 1/3] QAPI: introduce magration capability unix_page_flipping Lei Li
2013-10-25 14:59 ` [Qemu-devel] [PATCH 2/3] migration: add migrate_unix_page_flipping() Lei Li
@ 2013-10-25 14:59 ` Lei Li
2013-10-25 15:13 ` [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability Paolo Bonzini
3 siblings, 0 replies; 5+ messages in thread
From: Lei Li @ 2013-10-25 14:59 UTC (permalink / raw)
To: qemu-devel; +Cc: lagarcia, pbonzini, Lei Li, aliguori, quintela
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
qmp-commands.hx | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/qmp-commands.hx b/qmp-commands.hx
index fba15cd..dcec433 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -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:
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability
2013-10-25 14:59 [Qemu-devel] [PATCH 0/3 for 1.7] migration: introduce page flipping capability Lei Li
` (2 preceding siblings ...)
2013-10-25 14:59 ` [Qemu-devel] [PATCH 3/3] qmp-command.hx: add missing docs for migration capabilites Lei Li
@ 2013-10-25 15:13 ` Paolo Bonzini
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2013-10-25 15:13 UTC (permalink / raw)
To: Lei Li; +Cc: lagarcia, qemu-devel, aliguori, quintela
Il 25/10/2013 15:59, Lei Li ha scritto:
> 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
>
Sorry for the misunderstanding---I meant squashing them together in one
patch, not separating the series.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread