diff options
author | Juan Quintela <quintela@redhat.com> | 2023-04-12 22:30:20 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-04-12 22:47:50 +0200 |
commit | 28ef5339c37f1f78c2fa4df2295bc0cd73a0abfd (patch) | |
tree | 4e14ed81bffd8f196a7b98e6dddbc390e167ae1c /migration | |
parent | 37502df32c4b02403fe92452c4ed1d96da3df01c (diff) | |
download | qemu-28ef5339c37f1f78c2fa4df2295bc0cd73a0abfd.zip qemu-28ef5339c37f1f78c2fa4df2295bc0cd73a0abfd.tar.gz qemu-28ef5339c37f1f78c2fa4df2295bc0cd73a0abfd.tar.bz2 |
migration: fix ram_state_pending_exact()
I removed that bit on commit:
commit c8df4a7aeffcb46020f610526eea621fa5b0cd47
Author: Juan Quintela <quintela@redhat.com>
Date: Mon Oct 3 02:00:03 2022 +0200
migration: Split save_live_pending() into state_pending_*
Fixes: c8df4a7aeffcb46020f610526eea621fa5b0cd47
Suggested-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/ram.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c index 9d1817a..79d881f 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3506,12 +3506,13 @@ static void ram_state_pending_estimate(void *opaque, uint64_t *must_precopy, static void ram_state_pending_exact(void *opaque, uint64_t *must_precopy, uint64_t *can_postcopy) { + MigrationState *s = migrate_get_current(); RAMState **temp = opaque; RAMState *rs = *temp; uint64_t remaining_size = rs->migration_dirty_pages * TARGET_PAGE_SIZE; - if (!migration_in_postcopy()) { + if (!migration_in_postcopy() && remaining_size < s->threshold_size) { qemu_mutex_lock_iothread(); WITH_RCU_READ_LOCK_GUARD() { migration_bitmap_sync_precopy(rs); |