[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/5] migration: Remove unused threshold_size parameter
From: |
Juan Quintela |
Subject: |
[PULL 4/5] migration: Remove unused threshold_size parameter |
Date: |
Mon, 30 Jan 2023 09:03:06 +0100 |
Until previous commit, save_live_pending() was used for ram. Now with
the split into state_pending_estimate() and state_pending_exact() it
is not needed anymore, so remove them.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
include/migration/register.h | 2 --
migration/savevm.h | 6 ++----
hw/vfio/migration.c | 1 -
migration/block-dirty-bitmap.c | 1 -
migration/block.c | 2 +-
migration/migration.c | 10 ++++------
migration/ram.c | 4 ++--
migration/savevm.c | 11 ++++-------
migration/trace-events | 4 ++--
9 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/include/migration/register.h b/include/migration/register.h
index 15cf32994d..b91a0cdbf8 100644
--- a/include/migration/register.h
+++ b/include/migration/register.h
@@ -58,13 +58,11 @@ typedef struct SaveVMHandlers {
*/
/* This estimates the remaining data to transfer */
void (*state_pending_estimate)(void *opaque,
- uint64_t threshold_size,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only);
/* This calculate the exact remaining data to transfer */
void (*state_pending_exact)(void *opaque,
- uint64_t threshold_size,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only);
diff --git a/migration/savevm.h b/migration/savevm.h
index 5d2cff4411..b1901e68d5 100644
--- a/migration/savevm.h
+++ b/migration/savevm.h
@@ -40,12 +40,10 @@ void qemu_savevm_state_cleanup(void);
void qemu_savevm_state_complete_postcopy(QEMUFile *f);
int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only,
bool inactivate_disks);
-void qemu_savevm_state_pending_exact(uint64_t threshold_size,
- uint64_t *res_precopy_only,
+void qemu_savevm_state_pending_exact(uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only);
-void qemu_savevm_state_pending_estimate(uint64_t thershold_size,
- uint64_t *res_precopy_only,
+void qemu_savevm_state_pending_estimate(uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only);
void qemu_savevm_send_ping(QEMUFile *f, uint32_t value);
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index c49ca466d4..b3318f0f20 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -457,7 +457,6 @@ static void vfio_save_cleanup(void *opaque)
}
static void vfio_state_pending(void *opaque,
- uint64_t threshold_size,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index 6fac9fb34f..5a621419d3 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -763,7 +763,6 @@ static int dirty_bitmap_save_complete(QEMUFile *f, void
*opaque)
}
static void dirty_bitmap_state_pending(void *opaque,
- uint64_t max_size,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
diff --git a/migration/block.c b/migration/block.c
index 544e74e9c5..29f69025af 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -863,7 +863,7 @@ static int block_save_complete(QEMUFile *f, void *opaque)
return 0;
}
-static void block_state_pending(void *opaque, uint64_t max_size,
+static void block_state_pending(void *opaque,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
diff --git a/migration/migration.c b/migration/migration.c
index e7b4b94348..594a42f085 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3751,18 +3751,16 @@ static MigIterateState
migration_iteration_run(MigrationState *s)
uint64_t pend_pre, pend_compat, pend_post;
bool in_postcopy = s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE;
- qemu_savevm_state_pending_estimate(s->threshold_size, &pend_pre,
- &pend_compat, &pend_post);
+ qemu_savevm_state_pending_estimate(&pend_pre, &pend_compat, &pend_post);
uint64_t pending_size = pend_pre + pend_compat + pend_post;
- trace_migrate_pending_estimate(pending_size, s->threshold_size,
+ trace_migrate_pending_estimate(pending_size,
pend_pre, pend_compat, pend_post);
if (pend_pre + pend_compat <= s->threshold_size) {
- qemu_savevm_state_pending_exact(s->threshold_size, &pend_pre,
- &pend_compat, &pend_post);
+ qemu_savevm_state_pending_exact(&pend_pre, &pend_compat, &pend_post);
pending_size = pend_pre + pend_compat + pend_post;
- trace_migrate_pending_exact(pending_size, s->threshold_size,
+ trace_migrate_pending_exact(pending_size,
pend_pre, pend_compat, pend_post);
}
diff --git a/migration/ram.c b/migration/ram.c
index 56ff9cd29d..885d7dbf23 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3409,7 +3409,7 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
return 0;
}
-static void ram_state_pending_estimate(void *opaque, uint64_t max_size,
+static void ram_state_pending_estimate(void *opaque,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
@@ -3427,7 +3427,7 @@ static void ram_state_pending_estimate(void *opaque,
uint64_t max_size,
}
}
-static void ram_state_pending_exact(void *opaque, uint64_t max_size,
+static void ram_state_pending_exact(void *opaque,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
diff --git a/migration/savevm.c b/migration/savevm.c
index 7f9f770c1e..e1caa3ea7c 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1472,8 +1472,7 @@ flush:
* the result is split into the amount for units that can and
* for units that can't do postcopy.
*/
-void qemu_savevm_state_pending_estimate(uint64_t threshold_size,
- uint64_t *res_precopy_only,
+void qemu_savevm_state_pending_estimate(uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
{
@@ -1483,7 +1482,6 @@ void qemu_savevm_state_pending_estimate(uint64_t
threshold_size,
*res_compatible = 0;
*res_postcopy_only = 0;
-
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
if (!se->ops || !se->ops->state_pending_exact) {
continue;
@@ -1493,14 +1491,13 @@ void qemu_savevm_state_pending_estimate(uint64_t
threshold_size,
continue;
}
}
- se->ops->state_pending_exact(se->opaque, threshold_size,
+ se->ops->state_pending_exact(se->opaque,
res_precopy_only, res_compatible,
res_postcopy_only);
}
}
-void qemu_savevm_state_pending_exact(uint64_t threshold_size,
- uint64_t *res_precopy_only,
+void qemu_savevm_state_pending_exact(uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)
{
@@ -1519,7 +1516,7 @@ void qemu_savevm_state_pending_exact(uint64_t
threshold_size,
continue;
}
}
- se->ops->state_pending_estimate(se->opaque, threshold_size,
+ se->ops->state_pending_estimate(se->opaque,
res_precopy_only, res_compatible,
res_postcopy_only);
}
diff --git a/migration/trace-events b/migration/trace-events
index adb680b0e6..67b65a70ff 100644
--- a/migration/trace-events
+++ b/migration/trace-events
@@ -150,8 +150,8 @@ migrate_fd_cleanup(void) ""
migrate_fd_error(const char *error_desc) "error=%s"
migrate_fd_cancel(void) ""
migrate_handle_rp_req_pages(const char *rbname, size_t start, size_t len) "in
%s at 0x%zx len 0x%zx"
-migrate_pending_exact(uint64_t size, uint64_t max, uint64_t pre, uint64_t
compat, uint64_t post) "exact pending size %" PRIu64 " max %" PRIu64 " (pre =
%" PRIu64 " compat=%" PRIu64 " post=%" PRIu64 ")"
-migrate_pending_estimate(uint64_t size, uint64_t max, uint64_t pre, uint64_t
compat, uint64_t post) "estimate pending size %" PRIu64 " max %" PRIu64 " (pre
= %" PRIu64 " compat=%" PRIu64 " post=%" PRIu64 ")"
+migrate_pending_exact(uint64_t size, uint64_t pre, uint64_t compat, uint64_t
post) "exact pending size %" PRIu64 " (pre = %" PRIu64 " compat=%" PRIu64 "
post=%" PRIu64 ")"
+migrate_pending_estimate(uint64_t size, uint64_t pre, uint64_t compat,
uint64_t post) "estimate pending size %" PRIu64 " (pre = %" PRIu64 " compat=%"
PRIu64 " post=%" PRIu64 ")"
migrate_send_rp_message(int msg_type, uint16_t len) "%d: len %d"
migrate_send_rp_recv_bitmap(char *name, int64_t size) "block '%s' size
0x%"PRIi64
migration_completion_file_err(void) ""
--
2.39.1