migration: Remove unused threshold_size parameter

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>
This commit is contained in:
Juan Quintela 2022-10-03 02:50:42 +02:00
parent c8df4a7aef
commit fd70385d38
10 changed files with 16 additions and 27 deletions

View File

@ -182,7 +182,7 @@ static int cmma_save_setup(QEMUFile *f, void *opaque)
return 0;
}
static void cmma_state_pending(void *opaque, uint64_t max_size,
static void cmma_state_pending(void *opaque,
uint64_t *res_precopy_only,
uint64_t *res_compatible,
uint64_t *res_postcopy_only)

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -3781,18 +3781,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);
}

View File

@ -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)

View File

@ -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);
}

View File

@ -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);

View File

@ -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) ""