mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
migration: Fix low possibility downtime violation
When QEMU queried the estimated version of pending data and thinks it's ready to converge, it'll send another accurate query to make sure of it. It is needed to make sure we collect the latest reports and that equation still holds true. However we missed one tiny little difference here on "<" v.s. "<=" when comparing pending_size (A) to threshold_size (B).. QEMU src only re-query if A<B, but will kickoff switchover if A<=B. I think it means it is possible to happen if A (as an estimate only so far) accidentally equals to B, then re-query won't happen and switchover will proceed without considering new dirtied data. It turns out it was an accident in my commit7aaa1fc072when refactoring the code around. Fix this by using the same equation in both places. Fixes:7aaa1fc072("migration: Rewrite the migration complete detect logic") Cc: qemu-stable@nongnu.org Reviewed-by: Juraj Marcin <jmarcin@redhat.com> Link: https://lore.kernel.org/r/20260421202110.306051-3-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
@@ -3258,7 +3258,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
|
||||
* postcopy started, so ESTIMATE should always match with EXACT
|
||||
* during postcopy phase.
|
||||
*/
|
||||
if (pending_size < s->threshold_size) {
|
||||
if (pending_size <= s->threshold_size) {
|
||||
qemu_savevm_state_pending_exact(&must_precopy, &can_postcopy);
|
||||
pending_size = must_precopy + can_postcopy;
|
||||
trace_migrate_pending_exact(pending_size, must_precopy,
|
||||
|
||||
Reference in New Issue
Block a user