[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] migration: Drop unnecessary check in ram's pending_exact
|
From: |
Fabiano Rosas |
|
Subject: |
Re: [PATCH 2/3] migration: Drop unnecessary check in ram's pending_exact() |
|
Date: |
Fri, 19 Jan 2024 10:25:55 -0300 |
peterx@redhat.com writes:
> From: Peter Xu <peterx@redhat.com>
>
> When the migration frameworks fetches the exact pending sizes, it means
> this check:
>
> remaining_size < s->threshold_size
>
> Must have been done already, actually at migration_iteration_run():
>
> if (must_precopy <= s->threshold_size) {
> qemu_savevm_state_pending_exact(&must_precopy, &can_postcopy);
>
> That should be after one round of ram_state_pending_estimate(). It makes
> the 2nd check meaningless and can be dropped.
>
> To say it in another way, when reaching ->state_pending_exact(), we
> unconditionally sync dirty bits for precopy.
>
> Then we can drop migrate_get_current() there too.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>