qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bryan Zhang <bryan.zhang@bytedance.com>
To: qemu-devel@nongnu.org, peterx@redhat.com, farosas@suse.de
Cc: hao.xiang@bytedance.com, Bryan Zhang <bryan.zhang@BYTEDANCE.COM>,
	Bryan Zhang <bryan.zhang@bytedance.com>
Subject: [PATCH 1/2] migration: Properly apply migration compression level parameters
Date: Fri,  1 Mar 2024 03:59:00 +0000	[thread overview]
Message-ID: <20240301035901.4006936-2-bryan.zhang@bytedance.com> (raw)
In-Reply-To: <20240301035901.4006936-1-bryan.zhang@bytedance.com>

From: Bryan Zhang <bryan.zhang@BYTEDANCE.COM>

Some glue code was missing, so that using `qmp_migrate_set_parameters`
to set `multifd-zstd-level` or `multifd-zlib-level` did not work. This
commit adds the glue code to fix that.

Signed-off-by: Bryan Zhang <bryan.zhang@bytedance.com>
---
 migration/options.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/migration/options.c b/migration/options.c
index 3e3e0b93b4..1cd3cc7c33 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -1312,6 +1312,12 @@ static void migrate_params_test_apply(MigrateSetParameters *params,
     if (params->has_multifd_compression) {
         dest->multifd_compression = params->multifd_compression;
     }
+    if (params->has_multifd_zlib_level) {
+        dest->multifd_zlib_level = params->multifd_zlib_level;
+    }
+    if (params->has_multifd_zstd_level) {
+        dest->multifd_zstd_level = params->multifd_zstd_level;
+    }
     if (params->has_xbzrle_cache_size) {
         dest->xbzrle_cache_size = params->xbzrle_cache_size;
     }
@@ -1447,6 +1453,12 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
     if (params->has_multifd_compression) {
         s->parameters.multifd_compression = params->multifd_compression;
     }
+    if (params->has_multifd_zlib_level) {
+        s->parameters.multifd_zlib_level = params->multifd_zlib_level;
+    }
+    if (params->has_multifd_zstd_level) {
+        s->parameters.multifd_zstd_level = params->multifd_zstd_level;
+    }
     if (params->has_xbzrle_cache_size) {
         s->parameters.xbzrle_cache_size = params->xbzrle_cache_size;
         xbzrle_cache_resize(params->xbzrle_cache_size, errp);
-- 
2.30.2



  reply	other threads:[~2024-03-01  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  3:58 [PATCH 0/2] *** Properly apply migration compression level Bryan Zhang
2024-03-01  3:59 ` Bryan Zhang [this message]
2024-03-01  3:59 ` [PATCH 2/2] tests/migration: Set compression level in migration tests Bryan Zhang
2024-03-01  4:12 ` [PATCH 0/2] *** Properly apply migration compression level Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240301035901.4006936-2-bryan.zhang@bytedance.com \
    --to=bryan.zhang@bytedance.com \
    --cc=farosas@suse.de \
    --cc=hao.xiang@bytedance.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).