multifd: Only flush once each full round of memory

We need to add a new flag to mean to flush at that point.
Notice that we still flush at the end of setup and at the end of
complete stages.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>

---

Add missing qemu_fflush(), now it passes all tests always.
In the previous version, the check that changes the default value to
false got lost in some rebase.  Get it back.
This commit is contained in:
Juan Quintela
2022-06-21 13:36:11 +02:00
parent b05292c237
commit 294e5a4034
3 changed files with 30 additions and 9 deletions

View File

@ -89,7 +89,7 @@ Property migration_properties[] = {
DEFINE_PROP_BOOL("decompress-error-check", MigrationState,
decompress_error_check, true),
DEFINE_PROP_BOOL("multifd-flush-after-each-section", MigrationState,
multifd_flush_after_each_section, true),
multifd_flush_after_each_section, false),
DEFINE_PROP_UINT8("x-clear-bitmap-shift", MigrationState,
clear_bitmap_shift, CLEAR_BITMAP_SHIFT_DEFAULT),
DEFINE_PROP_BOOL("x-preempt-pre-7-2", MigrationState,
@ -341,11 +341,7 @@ bool migrate_multifd_flush_after_each_section(void)
{
MigrationState *s = migrate_get_current();
/*
* Until the patch that remove this comment, we always return that
* the property is enabled.
*/
return true || s->multifd_flush_after_each_section;
return s->multifd_flush_after_each_section;
}
bool migrate_postcopy(void)