migration: fix ram_state_pending_exact()
I removed that bit on commit: commitc8df4a7aef
Author: Juan Quintela <quintela@redhat.com> Date: Mon Oct 3 02:00:03 2022 +0200 migration: Split save_live_pending() into state_pending_* Fixes:c8df4a7aef
Suggested-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
37502df32c
commit
28ef5339c3
@ -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,
|
static void ram_state_pending_exact(void *opaque, uint64_t *must_precopy,
|
||||||
uint64_t *can_postcopy)
|
uint64_t *can_postcopy)
|
||||||
{
|
{
|
||||||
|
MigrationState *s = migrate_get_current();
|
||||||
RAMState **temp = opaque;
|
RAMState **temp = opaque;
|
||||||
RAMState *rs = *temp;
|
RAMState *rs = *temp;
|
||||||
|
|
||||||
uint64_t remaining_size = rs->migration_dirty_pages * TARGET_PAGE_SIZE;
|
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();
|
qemu_mutex_lock_iothread();
|
||||||
WITH_RCU_READ_LOCK_GUARD() {
|
WITH_RCU_READ_LOCK_GUARD() {
|
||||||
migration_bitmap_sync_precopy(rs);
|
migration_bitmap_sync_precopy(rs);
|
||||||
|
Loading…
Reference in New Issue
Block a user