* [PATCH v2 1/5] migration: Use proper indentation for migration.json
2023-06-22 19:50 [PATCH v2 0/5] Migration deprecated parts Juan Quintela
@ 2023-06-22 19:50 ` Juan Quintela
2023-06-27 16:20 ` Peter Xu
2023-06-22 19:50 ` [PATCH v2 2/5] migration: migrate 'inc' command option is deprecated Juan Quintela
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Juan Quintela @ 2023-06-22 19:50 UTC (permalink / raw)
To: qemu-devel
Cc: Markus Armbruster, Daniel P . Berrangé, Juan Quintela,
Thomas Huth, libvir-list, Peter Xu, qemu-block, Eric Blake,
Fam Zheng, Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras
We broke it with dirtyrate limit patches.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
qapi/migration.json | 67 ++++++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 34 deletions(-)
diff --git a/qapi/migration.json b/qapi/migration.json
index 6ff39157ba..ad8cc57071 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -258,17 +258,17 @@
# blocked. Present and non-empty when migration is blocked.
# (since 6.0)
#
-# @dirty-limit-throttle-time-per-round: Maximum throttle time (in microseconds) of virtual
-# CPUs each dirty ring full round, which shows how
-# MigrationCapability dirty-limit affects the guest
-# during live migration. (since 8.1)
+# @dirty-limit-throttle-time-per-round: Maximum throttle time (in
+# microseconds) of virtual CPUs each dirty ring full round, which
+# shows how MigrationCapability dirty-limit affects the guest
+# during live migration. (since 8.1)
#
-# @dirty-limit-ring-full-time: Estimated average dirty ring full time (in microseconds)
-# each dirty ring full round, note that the value equals
-# dirty ring memory size divided by average dirty page rate
-# of virtual CPU, which can be used to observe the average
-# memory load of virtual CPU indirectly. Note that zero
-# means guest doesn't dirty memory (since 8.1)
+# @dirty-limit-ring-full-time: Estimated average dirty ring full time
+# (in microseconds) each dirty ring full round, note that the
+# value equals dirty ring memory size divided by average dirty
+# page rate of virtual CPU, which can be used to observe the
+# average memory load of virtual CPU indirectly. Note that zero
+# means guest doesn't dirty memory (since 8.1)
#
# Since: 0.14
##
@@ -510,14 +510,13 @@
# (since 7.1)
#
# @dirty-limit: If enabled, migration will use the dirty-limit algo to
-# throttle down guest instead of auto-converge algo.
-# Throttle algo only works when vCPU's dirtyrate greater
-# than 'vcpu-dirty-limit', read processes in guest os
-# aren't penalized any more, so this algo can improve
-# performance of vCPU during live migration. This is an
-# optional performance feature and should not affect the
-# correctness of the existing auto-converge algo.
-# (since 8.1)
+# throttle down guest instead of auto-converge algo. Throttle
+# algo only works when vCPU's dirtyrate greater than
+# 'vcpu-dirty-limit', read processes in guest os aren't penalized
+# any more, so this algo can improve performance of vCPU during
+# live migration. This is an optional performance feature and
+# should not affect the correctness of the existing auto-converge
+# algo. (since 8.1)
#
# Features:
#
@@ -811,17 +810,17 @@
# Nodes are mapped to their block device name if there is one, and
# to their node name otherwise. (Since 5.2)
#
-# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty limit during
-# live migration. Should be in the range 1 to 1000ms,
-# defaults to 1000ms. (Since 8.1)
+# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty
+# limit during live migration. Should be in the range 1 to 1000ms,
+# defaults to 1000ms. (Since 8.1)
#
# @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration.
-# Defaults to 1. (Since 8.1)
+# Defaults to 1. (Since 8.1)
#
# Features:
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
-# are experimental.
+# are experimental.
#
# Since: 2.4
##
@@ -977,17 +976,17 @@
# Nodes are mapped to their block device name if there is one, and
# to their node name otherwise. (Since 5.2)
#
-# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty limit during
-# live migration. Should be in the range 1 to 1000ms,
-# defaults to 1000ms. (Since 8.1)
+# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty
+# limit during live migration. Should be in the range 1 to 1000ms,
+# defaults to 1000ms. (Since 8.1)
#
# @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration.
-# Defaults to 1. (Since 8.1)
+# Defaults to 1. (Since 8.1)
#
# Features:
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
-# are experimental.
+# are experimental.
#
# TODO: either fuse back into MigrationParameters, or make
# MigrationParameters members mandatory
@@ -1180,17 +1179,17 @@
# Nodes are mapped to their block device name if there is one, and
# to their node name otherwise. (Since 5.2)
#
-# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty limit during
-# live migration. Should be in the range 1 to 1000ms,
-# defaults to 1000ms. (Since 8.1)
+# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty
+# limit during live migration. Should be in the range 1 to 1000ms,
+# defaults to 1000ms. (Since 8.1)
#
# @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration.
-# Defaults to 1. (Since 8.1)
+# Defaults to 1. (Since 8.1)
#
# Features:
#
-# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
-# are experimental.
+# @unstable: Members @x-checkpoint-delay and
+# @x-vcpu-dirty-limit-period are experimental.
#
# Since: 2.4
##
--
2.40.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/5] migration: Use proper indentation for migration.json
2023-06-22 19:50 ` [PATCH v2 1/5] migration: Use proper indentation for migration.json Juan Quintela
@ 2023-06-27 16:20 ` Peter Xu
0 siblings, 0 replies; 11+ messages in thread
From: Peter Xu @ 2023-06-27 16:20 UTC (permalink / raw)
To: Juan Quintela
Cc: qemu-devel, Markus Armbruster, Daniel P . Berrangé,
Thomas Huth, libvir-list, qemu-block, Eric Blake, Fam Zheng,
Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras
On Thu, Jun 22, 2023 at 09:50:15PM +0200, Juan Quintela wrote:
> We broke it with dirtyrate limit patches.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 2/5] migration: migrate 'inc' command option is deprecated.
2023-06-22 19:50 [PATCH v2 0/5] Migration deprecated parts Juan Quintela
2023-06-22 19:50 ` [PATCH v2 1/5] migration: Use proper indentation for migration.json Juan Quintela
@ 2023-06-22 19:50 ` Juan Quintela
2023-07-06 8:43 ` Thomas Huth
2023-06-22 19:50 ` [PATCH v2 3/5] migration: migrate 'blk' " Juan Quintela
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Juan Quintela @ 2023-06-22 19:50 UTC (permalink / raw)
To: qemu-devel
Cc: Markus Armbruster, Daniel P . Berrangé, Juan Quintela,
Thomas Huth, libvir-list, Peter Xu, qemu-block, Eric Blake,
Fam Zheng, Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras
Set the 'block_incremental' migration parameter to 'true' instead.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 7 +++++++
qapi/migration.json | 12 ++++++++++--
migration/migration.c | 6 ++++++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index e1aa0eafc8..cc0001041f 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -433,3 +433,10 @@ Migration
``skipped`` field in Migration stats has been deprecated. It hasn't
been used for more than 10 years.
+``inc`` migrate command option (since 8.1)
+''''''''''''''''''''''''''''''''''''''''''
+
+The new way to modify migration is using migration parameters.
+``inc`` functionality can be achieved by setting the
+``block-incremental`` migration parameter to ``true``.
+
diff --git a/qapi/migration.json b/qapi/migration.json
index ad8cc57071..8b30f748ef 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1479,13 +1479,20 @@
#
# @blk: do block migration (full disk copy)
#
-# @inc: incremental disk copy migration
+# @inc: incremental disk copy migration. This option is deprecated.
+# Set the 'block-incremetantal' migration parameter to 'true'
+# instead.
#
# @detach: this argument exists only for compatibility reasons and is
# ignored by QEMU
#
# @resume: resume one paused migration, default "off". (since 3.0)
#
+# Features:
+#
+# @deprecated: option @inc should be enabled by setting the
+# 'block-incremental' migration parameter to 'true'.
+#
# Returns: nothing on success
#
# Since: 0.14
@@ -1507,7 +1514,8 @@
# <- { "return": {} }
##
{ 'command': 'migrate',
- 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
+ 'data': {'uri': 'str', '*blk': 'bool',
+ '*inc': { 'type': 'bool', 'features': ['deprecated'] },
'*detach': 'bool', '*resume': 'bool' } }
##
diff --git a/migration/migration.c b/migration/migration.c
index 7a4ba2e846..abc40e6ef6 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1557,6 +1557,12 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
{
Error *local_err = NULL;
+ if (blk_inc) {
+ warn_report("-inc migrate option is deprecated, set the "
+ "'block-incremental' migration parameter to 'true'"
+ " instead.");
+ }
+
if (resume) {
if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
error_setg(errp, "Cannot resume if there is no "
--
2.40.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/5] migration: migrate 'inc' command option is deprecated.
2023-06-22 19:50 ` [PATCH v2 2/5] migration: migrate 'inc' command option is deprecated Juan Quintela
@ 2023-07-06 8:43 ` Thomas Huth
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-06 8:43 UTC (permalink / raw)
To: Juan Quintela, qemu-devel
Cc: Fam Zheng, qemu-block, libvir-list, Markus Armbruster, Peter Xu,
Leonardo Bras, Stefan Hajnoczi, Paolo Bonzini, Eric Blake
On 22/06/2023 21.50, Juan Quintela wrote:
> Set the 'block_incremental' migration parameter to 'true' instead.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> docs/about/deprecated.rst | 7 +++++++
> qapi/migration.json | 12 ++++++++++--
> migration/migration.c | 6 ++++++
> 3 files changed, 23 insertions(+), 2 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 3/5] migration: migrate 'blk' command option is deprecated.
2023-06-22 19:50 [PATCH v2 0/5] Migration deprecated parts Juan Quintela
2023-06-22 19:50 ` [PATCH v2 1/5] migration: Use proper indentation for migration.json Juan Quintela
2023-06-22 19:50 ` [PATCH v2 2/5] migration: migrate 'inc' command option is deprecated Juan Quintela
@ 2023-06-22 19:50 ` Juan Quintela
2023-07-06 8:49 ` Thomas Huth
2023-06-22 19:50 ` [PATCH v2 4/5] migration: Deprecate block migration Juan Quintela
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Juan Quintela @ 2023-06-22 19:50 UTC (permalink / raw)
To: qemu-devel
Cc: Markus Armbruster, Daniel P . Berrangé, Juan Quintela,
Thomas Huth, libvir-list, Peter Xu, qemu-block, Eric Blake,
Fam Zheng, Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras
Set the 'block' migration capability to 'true' instead.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 7 +++++++
qapi/migration.json | 10 +++++++---
migration/migration.c | 5 +++++
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index cc0001041f..f727db958e 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -440,3 +440,10 @@ The new way to modify migration is using migration parameters.
``inc`` functionality can be achieved by setting the
``block-incremental`` migration parameter to ``true``.
+``blk`` migrate command option (since 8.1)
+''''''''''''''''''''''''''''''''''''''''''
+
+The new way to modify migration is using migration parameters.
+``blk`` functionality can be achieved by setting the
+``block`` migration capability to ``true``.
+
diff --git a/qapi/migration.json b/qapi/migration.json
index 8b30f748ef..291af9407e 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1477,7 +1477,9 @@
#
# @uri: the Uniform Resource Identifier of the destination VM
#
-# @blk: do block migration (full disk copy)
+# @blk: do block migration (full disk copy). This option is
+# deprecated. Set the 'block' migration capability to 'true'
+# instead.
#
# @inc: incremental disk copy migration. This option is deprecated.
# Set the 'block-incremetantal' migration parameter to 'true'
@@ -1491,7 +1493,8 @@
# Features:
#
# @deprecated: option @inc should be enabled by setting the
-# 'block-incremental' migration parameter to 'true'.
+# 'block-incremental' migration parameter to 'true', option @blk
+# should be enabled by setting the 'block' capability to 'true'.
#
# Returns: nothing on success
#
@@ -1514,7 +1517,8 @@
# <- { "return": {} }
##
{ 'command': 'migrate',
- 'data': {'uri': 'str', '*blk': 'bool',
+ 'data': {'uri': 'str',
+ '*blk': { 'type': 'bool', 'features': ['deprecated'] },
'*inc': { 'type': 'bool', 'features': ['deprecated'] },
'*detach': 'bool', '*resume': 'bool' } }
diff --git a/migration/migration.c b/migration/migration.c
index abc40e6ef6..4c7e8ff5ee 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1563,6 +1563,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
" instead.");
}
+ if (blk) {
+ warn_report("-blk migrate option is deprecated, set the "
+ "'block' capability to 'true' instead.");
+ }
+
if (resume) {
if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
error_setg(errp, "Cannot resume if there is no "
--
2.40.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/5] migration: migrate 'blk' command option is deprecated.
2023-06-22 19:50 ` [PATCH v2 3/5] migration: migrate 'blk' " Juan Quintela
@ 2023-07-06 8:49 ` Thomas Huth
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-06 8:49 UTC (permalink / raw)
To: Juan Quintela, qemu-devel
Cc: Markus Armbruster, Daniel P . Berrangé, libvir-list,
Peter Xu, qemu-block, Eric Blake, Fam Zheng, Paolo Bonzini,
Stefan Hajnoczi, Leonardo Bras
On 22/06/2023 21.50, Juan Quintela wrote:
> Set the 'block' migration capability to 'true' instead.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> docs/about/deprecated.rst | 7 +++++++
> qapi/migration.json | 10 +++++++---
> migration/migration.c | 5 +++++
> 3 files changed, 19 insertions(+), 3 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 4/5] migration: Deprecate block migration
2023-06-22 19:50 [PATCH v2 0/5] Migration deprecated parts Juan Quintela
` (2 preceding siblings ...)
2023-06-22 19:50 ` [PATCH v2 3/5] migration: migrate 'blk' " Juan Quintela
@ 2023-06-22 19:50 ` Juan Quintela
2023-06-22 19:50 ` [PATCH v2 5/5] migration: Deprecate old compression method Juan Quintela
2023-07-07 7:32 ` [PATCH v2 0/5] Migration deprecated parts Markus Armbruster
5 siblings, 0 replies; 11+ messages in thread
From: Juan Quintela @ 2023-06-22 19:50 UTC (permalink / raw)
To: qemu-devel
Cc: Markus Armbruster, Daniel P . Berrangé, Juan Quintela,
Thomas Huth, libvir-list, Peter Xu, qemu-block, Eric Blake,
Fam Zheng, Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras,
Kevin Wolf, Hanna Czenczek
It is obsolete. It is better to use driver-mirror with NBD instead.
CC: Kevin Wolf <kwolf@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 10 ++++++++++
qapi/migration.json | 30 +++++++++++++++++++++++++-----
migration/block.c | 3 +++
migration/options.c | 9 ++++++++-
4 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index f727db958e..2d7c48185e 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -447,3 +447,13 @@ The new way to modify migration is using migration parameters.
``blk`` functionality can be achieved by setting the
``block`` migration capability to ``true``.
+block migration (since 8.1)
+'''''''''''''''''''''''''''
+
+Block migration is too inflexible. It needs to migrate all block
+devices or none.
+
+Please see "QMP invocation for live storage migration with
+``driver-mirror`` + NBD" in docs/interop/live-block-operations.rst for
+a detailed explanation.
+
diff --git a/qapi/migration.json b/qapi/migration.json
index 291af9407e..08dee855cb 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -270,11 +270,16 @@
# average memory load of virtual CPU indirectly. Note that zero
# means guest doesn't dirty memory (since 8.1)
#
+# Features:
+#
+# @deprecated: @disk migration is deprecated. Use driver-mirror
+# with NBD instead.
+#
# Since: 0.14
##
{ 'struct': 'MigrationInfo',
'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
- '*disk': 'MigrationStats',
+ '*disk': { 'type': 'MigrationStats', 'features': ['deprecated'] },
'*vfio': 'VfioStats',
'*xbzrle-cache': 'XBZRLECacheStats',
'*total-time': 'int',
@@ -520,6 +525,9 @@
#
# Features:
#
+# @deprecated: @block migration is deprecated. Use driver-mirror
+# with NBD instead.
+#
# @unstable: Members @x-colo and @x-ignore-shared are experimental.
#
# Since: 1.2
@@ -529,7 +537,8 @@
'compress', 'events', 'postcopy-ram',
{ 'name': 'x-colo', 'features': [ 'unstable' ] },
'release-ram',
- 'block', 'return-path', 'pause-before-switchover', 'multifd',
+ { 'name': 'block', 'features': [ 'deprecated' ] },
+ 'return-path', 'pause-before-switchover', 'multifd',
'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
{ 'name': 'x-ignore-shared', 'features': [ 'unstable' ] },
'validate-uuid', 'background-snapshot',
@@ -819,6 +828,9 @@
#
# Features:
#
+# @deprecated: Member @block-incremental is obsolete. Use
+# driver-mirror with NBD instead.
+#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
#
@@ -834,7 +846,7 @@
'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
'downtime-limit',
{ 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] },
- 'block-incremental',
+ { 'name': 'block-incremental', 'features': [ 'deprecated' ] },
'multifd-channels',
'xbzrle-cache-size', 'max-postcopy-bandwidth',
'max-cpu-throttle', 'multifd-compression',
@@ -985,6 +997,9 @@
#
# Features:
#
+# @deprecated: Member @block-incremental is obsolete. Use
+# driver-mirror with NBD instead.
+#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
#
@@ -1013,7 +1028,8 @@
'*downtime-limit': 'uint64',
'*x-checkpoint-delay': { 'type': 'uint32',
'features': [ 'unstable' ] },
- '*block-incremental': 'bool',
+ '*block-incremental': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
'*multifd-channels': 'uint8',
'*xbzrle-cache-size': 'size',
'*max-postcopy-bandwidth': 'size',
@@ -1188,6 +1204,9 @@
#
# Features:
#
+# @deprecated: Member @block-incremental is obsolete. Use
+# driver-mirror with NBD instead.
+#
# @unstable: Members @x-checkpoint-delay and
# @x-vcpu-dirty-limit-period are experimental.
#
@@ -1213,7 +1232,8 @@
'*downtime-limit': 'uint64',
'*x-checkpoint-delay': { 'type': 'uint32',
'features': [ 'unstable' ] },
- '*block-incremental': 'bool',
+ '*block-incremental': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
'*multifd-channels': 'uint8',
'*xbzrle-cache-size': 'size',
'*max-postcopy-bandwidth': 'size',
diff --git a/migration/block.c b/migration/block.c
index b29e80bdc4..a095024108 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -722,6 +722,9 @@ static int block_save_setup(QEMUFile *f, void *opaque)
trace_migration_block_save("setup", block_mig_state.submitted,
block_mig_state.transferred);
+ warn_report("block migration is deprecated. Use driver-mirror with"
+ "NBD instead.");
+
qemu_mutex_lock_iothread();
ret = init_blk_migration(f);
if (ret < 0) {
diff --git a/migration/options.c b/migration/options.c
index c072c2fab7..24c883696f 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "exec/target_page.h"
#include "qapi/clone-visitor.h"
#include "qapi/error.h"
@@ -456,10 +457,14 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
if (new_caps[MIGRATION_CAPABILITY_BLOCK]) {
error_setg(errp, "QEMU compiled without old-style (blk/-b, inc/-i) "
"block migration");
- error_append_hint(errp, "Use drive_mirror+NBD instead.\n");
+ error_append_hint(errp, "Use driver-mirror with NBD instead.\n");
return false;
}
#endif
+ if (new_caps[MIGRATION_CAPABILITY_BLOCK]) {
+ warn_report("Block migration is deprecated. "
+ "Use driver-mirror with NBD instead.");
+ }
#ifndef CONFIG_REPLICATION
if (new_caps[MIGRATION_CAPABILITY_X_COLO]) {
@@ -1336,6 +1341,8 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
}
if (params->has_block_incremental) {
+ warn_report("Block migration is deprecated. "
+ "Use driver-mirror with NBD instead.");
s->parameters.block_incremental = params->block_incremental;
}
if (params->has_multifd_channels) {
--
2.40.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 5/5] migration: Deprecate old compression method
2023-06-22 19:50 [PATCH v2 0/5] Migration deprecated parts Juan Quintela
` (3 preceding siblings ...)
2023-06-22 19:50 ` [PATCH v2 4/5] migration: Deprecate block migration Juan Quintela
@ 2023-06-22 19:50 ` Juan Quintela
2023-06-27 16:21 ` Peter Xu
2023-07-07 7:32 ` [PATCH v2 0/5] Migration deprecated parts Markus Armbruster
5 siblings, 1 reply; 11+ messages in thread
From: Juan Quintela @ 2023-06-22 19:50 UTC (permalink / raw)
To: qemu-devel
Cc: Markus Armbruster, Daniel P . Berrangé, Juan Quintela,
Thomas Huth, libvir-list, Peter Xu, qemu-block, Eric Blake,
Fam Zheng, Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 8 +++
qapi/migration.json | 102 ++++++++++++++++++++++++--------------
migration/options.c | 13 +++++
3 files changed, 86 insertions(+), 37 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 2d7c48185e..792de61c8b 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -457,3 +457,11 @@ Please see "QMP invocation for live storage migration with
``driver-mirror`` + NBD" in docs/interop/live-block-operations.rst for
a detailed explanation.
+old compression method (since 8.1)
+''''''''''''''''''''''''''''''''''
+
+Compression method fails too much. Too many races. We are going to
+remove it if nobody fixes it. For starters, migration-test
+compression tests are disabled becase they fail randomly. If you need
+compression, use multifd compression methods.
+
diff --git a/qapi/migration.json b/qapi/migration.json
index 08dee855cb..11f759b90b 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -244,7 +244,9 @@
#
# @compression: migration compression statistics, only returned if
# compression feature is on and status is 'active' or 'completed'
-# (Since 3.1)
+# This feature is unreliable and not tested. It is recommended to
+# use multifd migration instead, which offers an alternative
+# reliable and tested compression implementation. (Since 3.1)
#
# @socket-address: Only used for tcp, to know what the real port is
# (Since 4.0)
@@ -272,8 +274,11 @@
#
# Features:
#
-# @deprecated: @disk migration is deprecated. Use driver-mirror
-# with NBD instead.
+# @deprecated: @disk migration is deprecated. Use driver-mirror with
+# NBD instead. @compression is unreliable and untested. It is
+# recommended to use multifd migration, which offers an
+# alternative compression implementation that is reliable and
+# tested.
#
# Since: 0.14
##
@@ -291,7 +296,7 @@
'*blocked-reasons': ['str'],
'*postcopy-blocktime': 'uint32',
'*postcopy-vcpu-blocktime': ['uint32'],
- '*compression': 'CompressionStats',
+ '*compression': { 'type': 'CompressionStats', 'features': ['deprecated'] },
'*socket-address': ['SocketAddress'],
'*dirty-limit-throttle-time-per-round': 'uint64',
'*dirty-limit-ring-full-time': 'uint64'} }
@@ -446,7 +451,8 @@
# compress and xbzrle are both on, compress only takes effect in
# the ram bulk stage, after that, it will be disabled and only
# xbzrle takes effect, this can help to minimize migration
-# traffic. The feature is disabled by default. (since 2.4 )
+# traffic. The feature is disabled by default. Obsolete. Use
+# multifd compression methods if needed. (since 2.4 )
#
# @events: generate events for each migration state change (since 2.4
# )
@@ -525,8 +531,9 @@
#
# Features:
#
-# @deprecated: @block migration is deprecated. Use driver-mirror
-# with NBD instead.
+# @deprecated: @block migration is deprecated. Use driver-mirror with
+# NBD instead. @compress is obsolete, use multifd compression
+# methods instead.
#
# @unstable: Members @x-colo and @x-ignore-shared are experimental.
#
@@ -534,7 +541,8 @@
##
{ 'enum': 'MigrationCapability',
'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
- 'compress', 'events', 'postcopy-ram',
+ { 'name': 'compress', 'features': [ 'deprecated' ] },
+ 'events', 'postcopy-ram',
{ 'name': 'x-colo', 'features': [ 'unstable' ] },
'release-ram',
{ 'name': 'block', 'features': [ 'deprecated' ] },
@@ -694,22 +702,24 @@
# migration, the compression level is an integer between 0 and 9,
# where 0 means no compression, 1 means the best compression
# speed, and 9 means best compression ratio which will consume
-# more CPU.
+# more CPU. Obsolete, see multifd compression if needed.
#
# @compress-threads: Set compression thread count to be used in live
# migration, the compression thread count is an integer between 1
-# and 255.
+# and 255. Obsolete, see multifd compression if needed.
#
# @compress-wait-thread: Controls behavior when all compression
# threads are currently busy. If true (default), wait for a free
# compression thread to become available; otherwise, send the page
-# uncompressed. (Since 3.1)
+# uncompressed. Obsolete, see multifd compression if
+# needed. (Since 3.1)
#
# @decompress-threads: Set decompression thread count to be used in
# live migration, the decompression thread count is an integer
# between 1 and 255. Usually, decompression is at least 4 times as
# fast as compression, so set the decompress-threads to the number
-# about 1/4 of compress-threads is adequate.
+# about 1/4 of compress-threads is adequate. Obsolete, see multifd
+# compression if needed.
#
# @throttle-trigger-threshold: The ratio of bytes_dirty_period and
# bytes_xfer_period to trigger throttling. It is expressed as
@@ -829,7 +839,9 @@
# Features:
#
# @deprecated: Member @block-incremental is obsolete. Use
-# driver-mirror with NBD instead.
+# driver-mirror with NBD instead. Compression is obsolete, so
+# members @compress-level, @compress-threads, @decompress-threads
+# and @compress-wait-thread should not be used.
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
@@ -839,8 +851,11 @@
{ 'enum': 'MigrationParameter',
'data': ['announce-initial', 'announce-max',
'announce-rounds', 'announce-step',
- 'compress-level', 'compress-threads', 'decompress-threads',
- 'compress-wait-thread', 'throttle-trigger-threshold',
+ { 'name': 'compress-level', 'features': [ 'deprecated' ] },
+ { 'name': 'compress-threads', 'features': [ 'deprecated' ] },
+ { 'name': 'decompress-threads', 'features': [ 'deprecated' ] },
+ { 'name': 'compress-wait-thread', 'features': [ 'deprecated' ] },
+ 'throttle-trigger-threshold',
'cpu-throttle-initial', 'cpu-throttle-increment',
'cpu-throttle-tailslow',
'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
@@ -870,16 +885,17 @@
# @announce-step: Increase in delay (in milliseconds) between
# subsequent packets in the announcement (Since 4.0)
#
-# @compress-level: compression level
+# @compress-level: compression level. Obsolete and deprecated.
#
-# @compress-threads: compression thread count
+# @compress-threads: compression thread count. Obsolete and deprecated.
#
# @compress-wait-thread: Controls behavior when all compression
# threads are currently busy. If true (default), wait for a free
# compression thread to become available; otherwise, send the page
-# uncompressed. (Since 3.1)
+# uncompressed. Obsolete and deprecated. (Since 3.1)
#
-# @decompress-threads: decompression thread count
+# @decompress-threads: decompression thread count. Obsolete and
+# deprecated.
#
# @throttle-trigger-threshold: The ratio of bytes_dirty_period and
# bytes_xfer_period to trigger throttling. It is expressed as
@@ -998,7 +1014,9 @@
# Features:
#
# @deprecated: Member @block-incremental is obsolete. Use
-# driver-mirror with NBD instead.
+# driver-mirror with NBD instead. Compression is obsolete, so
+# members @compress-level, @compress-threads, @decompress-threads
+# and @compress-wait-thread should not be used.
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
@@ -1013,10 +1031,14 @@
'*announce-max': 'size',
'*announce-rounds': 'size',
'*announce-step': 'size',
- '*compress-level': 'uint8',
- '*compress-threads': 'uint8',
- '*compress-wait-thread': 'bool',
- '*decompress-threads': 'uint8',
+ '*compress-level': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-wait-thread': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
+ '*decompress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
'*throttle-trigger-threshold': 'uint8',
'*cpu-throttle-initial': 'uint8',
'*cpu-throttle-increment': 'uint8',
@@ -1052,7 +1074,7 @@
# Example:
#
# -> { "execute": "migrate-set-parameters" ,
-# "arguments": { "compress-level": 1 } }
+# "arguments": { "multifd-channels": 5 } }
# <- { "return": {} }
##
{ 'command': 'migrate-set-parameters', 'boxed': true,
@@ -1075,16 +1097,18 @@
# @announce-step: Increase in delay (in milliseconds) between
# subsequent packets in the announcement (Since 4.0)
#
-# @compress-level: compression level
+# @compress-level: compression level. Obsolete and deprecated.
#
-# @compress-threads: compression thread count
+# @compress-threads: compression thread count. Obsolete and
+# deprecated.
#
# @compress-wait-thread: Controls behavior when all compression
# threads are currently busy. If true (default), wait for a free
# compression thread to become available; otherwise, send the page
-# uncompressed. (Since 3.1)
+# uncompressed. Obsolete and deprecated. (Since 3.1)
#
-# @decompress-threads: decompression thread count
+# @decompress-threads: decompression thread count. Obsolete and
+# deprecated.
#
# @throttle-trigger-threshold: The ratio of bytes_dirty_period and
# bytes_xfer_period to trigger throttling. It is expressed as
@@ -1205,7 +1229,9 @@
# Features:
#
# @deprecated: Member @block-incremental is obsolete. Use
-# driver-mirror with NBD instead.
+# driver-mirror with NBD instead. Compression is obsolete, so
+# members @compress-level, @compress-threads, @decompress-threads
+# and @compress-wait-thread should not be used.
#
# @unstable: Members @x-checkpoint-delay and
# @x-vcpu-dirty-limit-period are experimental.
@@ -1217,10 +1243,14 @@
'*announce-max': 'size',
'*announce-rounds': 'size',
'*announce-step': 'size',
- '*compress-level': 'uint8',
- '*compress-threads': 'uint8',
- '*compress-wait-thread': 'bool',
- '*decompress-threads': 'uint8',
+ '*compress-level': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-wait-thread': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
+ '*decompress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
'*throttle-trigger-threshold': 'uint8',
'*cpu-throttle-initial': 'uint8',
'*cpu-throttle-increment': 'uint8',
@@ -1259,10 +1289,8 @@
#
# -> { "execute": "query-migrate-parameters" }
# <- { "return": {
-# "decompress-threads": 2,
+# "multifd-channels": 2,
# "cpu-throttle-increment": 10,
-# "compress-threads": 8,
-# "compress-level": 1,
# "cpu-throttle-initial": 20,
# "max-bandwidth": 33554432,
# "downtime-limit": 300
diff --git a/migration/options.c b/migration/options.c
index 24c883696f..7a25339156 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -466,6 +466,11 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
"Use driver-mirror with NBD instead.");
}
+ if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) {
+ warn_report("Old compression method is deprecated. "
+ "Use multifd compression methods instead.");
+ }
+
#ifndef CONFIG_REPLICATION
if (new_caps[MIGRATION_CAPABILITY_X_COLO]) {
error_setg(errp, "QEMU compiled without replication module"
@@ -1275,18 +1280,26 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
/* TODO use QAPI_CLONE() instead of duplicating it inline */
if (params->has_compress_level) {
+ warn_report("Old compression is deprecated. "
+ "Use multifd compression methods instead.");
s->parameters.compress_level = params->compress_level;
}
if (params->has_compress_threads) {
+ warn_report("Old compression is deprecated. "
+ "Use multifd compression methods instead.");
s->parameters.compress_threads = params->compress_threads;
}
if (params->has_compress_wait_thread) {
+ warn_report("Old compression is deprecated. "
+ "Use multifd compression methods instead.");
s->parameters.compress_wait_thread = params->compress_wait_thread;
}
if (params->has_decompress_threads) {
+ warn_report("Old compression is deprecated. "
+ "Use multifd compression methods instead.");
s->parameters.decompress_threads = params->decompress_threads;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 5/5] migration: Deprecate old compression method
2023-06-22 19:50 ` [PATCH v2 5/5] migration: Deprecate old compression method Juan Quintela
@ 2023-06-27 16:21 ` Peter Xu
0 siblings, 0 replies; 11+ messages in thread
From: Peter Xu @ 2023-06-27 16:21 UTC (permalink / raw)
To: Juan Quintela
Cc: qemu-devel, Markus Armbruster, Daniel P . Berrangé,
Thomas Huth, libvir-list, qemu-block, Eric Blake, Fam Zheng,
Paolo Bonzini, Stefan Hajnoczi, Leonardo Bras
On Thu, Jun 22, 2023 at 09:50:19PM +0200, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/5] Migration deprecated parts
2023-06-22 19:50 [PATCH v2 0/5] Migration deprecated parts Juan Quintela
` (4 preceding siblings ...)
2023-06-22 19:50 ` [PATCH v2 5/5] migration: Deprecate old compression method Juan Quintela
@ 2023-07-07 7:32 ` Markus Armbruster
5 siblings, 0 replies; 11+ messages in thread
From: Markus Armbruster @ 2023-07-07 7:32 UTC (permalink / raw)
To: Juan Quintela
Cc: qemu-devel, Daniel P . Berrangé, Thomas Huth, libvir-list,
Peter Xu, qemu-block, Eric Blake, Fam Zheng, Paolo Bonzini,
Stefan Hajnoczi, Leonardo Bras
Doesn't apply to master, and has no Based-on: tags telling me what to
apply first. Please advise :)
^ permalink raw reply [flat|nested] 11+ messages in thread