mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
migration: Split save_live_pending() into state_pending_*
We split the function into to: - state_pending_estimate: We estimate the remaining state size without stopping the machine. - state pending_exact: We calculate the exact amount of remaining state. The only "device" that implements different functions for _estimate() and _exact() is ram. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
255dc7af7e
commit
c8df4a7aef
13 changed files with 143 additions and 76 deletions
|
@ -46,11 +46,6 @@ typedef struct SaveVMHandlers {
|
|||
|
||||
/* This runs outside the iothread lock! */
|
||||
int (*save_setup)(QEMUFile *f, void *opaque);
|
||||
void (*save_live_pending)(void *opaque,
|
||||
uint64_t threshold_size,
|
||||
uint64_t *res_precopy_only,
|
||||
uint64_t *res_compatible,
|
||||
uint64_t *res_postcopy_only);
|
||||
/* Note for save_live_pending:
|
||||
* - res_precopy_only is for data which must be migrated in precopy phase
|
||||
* or in stopped state, in other words - before target vm start
|
||||
|
@ -61,8 +56,18 @@ typedef struct SaveVMHandlers {
|
|||
* Sum of res_postcopy_only, res_compatible and res_postcopy_only is the
|
||||
* whole amount of pending data.
|
||||
*/
|
||||
|
||||
|
||||
/* 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);
|
||||
LoadStateHandler *load_state;
|
||||
int (*load_setup)(QEMUFile *f, void *opaque);
|
||||
int (*load_cleanup)(void *opaque);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue