Skip to contentSkip to conversation

migration: Add zstd support in multi-thread compression

PATCH In review Zeyu Jin 2 participants 3 messages Nov 27, 2020 – Dec 1, 2020

lore
Share & tools
lore

Zeyu Jin

author
#0 lore raw

PATCH v2 4/6 migration: Add zstd support in multi-thread compression

This patch enables zstd option in multi-thread compression.

---
 hw/core/qdev-properties-system.c |   2 +-
 migration/ram.c                  | 128 ++++++++++++++++++++++++++++++-
 qapi/migration.json              |   2 +-
 3 files changed, 129 insertions(+), 3 deletions(-)
hw/core/qdev-properties-system.c +1 -1
index a582721a7b..b369187bdc 100644
@@ -667,7 +667,7 @@ const PropertyInfo qdev_prop_multifd_compression = {
 const PropertyInfo qdev_prop_compress_method = {
     .name = "CompressMethod",
     .description = "multi-thread compression method, "
-                   "zlib",
+                   "zlib/zstd",
     .enum_table = &CompressMethod_lookup,
     .get = qdev_propinfo_get_enum,
     .set = qdev_propinfo_set_enum,
migration/ram.c +127 -1

166 lines not on this page · raw message

qapi/migration.json +1 -1
index 2ed6a55b92..883e597ae3 100644
@@ -536,7 +536,7 @@
 #
 ##
 { 'enum': 'CompressMethod',
-  'data': [ 'zlib' ] }
+  'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }
 
 ##
 # @BitmapMigrationBitmapAlias:
Signature · 1 line
2.27.0
#1 lore raw

qapi/migration.json line 539

Quoted 13 lines · Zeyu Jin

This patch enables zstd option in multi-thread compression.

---

+++ b/qapi/migration.json

qapi/migration.json +1 -1
@@ -536,7 +536,7 @@
 #
 ##
 { 'enum': 'CompressMethod',
-  'data': [ 'zlib' ] }
+  'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }

Missing documentation of the new value, including a '(since 6.0)' marker.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
author
#2 lore raw
Quoted 7 lines · Eric Blake
Quoted 5 lines · Zeyu Jin

This patch enables zstd option in multi-thread compression.

---

Quoted 10 lines

qapi/migration.json line 539

Quoted 7 lines

+++ b/qapi/migration.json

qapi/migration.json +1 -1
@@ -536,7 +536,7 @@
 #
 ##
 { 'enum': 'CompressMethod',
-  'data': [ 'zlib' ] }
+  'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }

Missing documentation of the new value, including a '(since 6.0)' marker.

Yes, will fix it.