[PATCH 1/4] migration/multifd: Avoid the final FLUSH in complete()

Peter Xu posted 4 patches 4 months, 1 week ago
Maintainers: Hailiang Zhang <zhanghailiang@xfusion.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
[PATCH 1/4] migration/multifd: Avoid the final FLUSH in complete()
Posted by Peter Xu 4 months, 1 week ago
We always do the flush when finishing one round of scan, and during
complete() phase we should scan one more round making sure no dirty page
existed.  In that case we shouldn't need one explicit FLUSH at the end of
complete(), as when reaching there all pages should have been flushed.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 migration/ram.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/migration/ram.c b/migration/ram.c
index ceea586b06..edec1a2d07 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3300,10 +3300,6 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
         }
     }
 
-    if (migrate_multifd() && !migrate_multifd_flush_after_each_section() &&
-        !migrate_mapped_ram()) {
-        qemu_put_be64(f, RAM_SAVE_FLAG_MULTIFD_FLUSH);
-    }
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
     return qemu_fflush(f);
 }
-- 
2.45.0
Re: [PATCH 1/4] migration/multifd: Avoid the final FLUSH in complete()
Posted by Fabiano Rosas 4 months, 1 week ago
Peter Xu <peterx@redhat.com> writes:

> We always do the flush when finishing one round of scan, and during
> complete() phase we should scan one more round making sure no dirty page
> existed.  In that case we shouldn't need one explicit FLUSH at the end of
> complete(), as when reaching there all pages should have been flushed.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Re: [PATCH 1/4] migration/multifd: Avoid the final FLUSH in complete()
Posted by Fabiano Rosas 4 months, 1 week ago
Fabiano Rosas <farosas@suse.de> writes:

> Peter Xu <peterx@redhat.com> writes:
>
>> We always do the flush when finishing one round of scan, and during
>> complete() phase we should scan one more round making sure no dirty page
>> existed.  In that case we shouldn't need one explicit FLUSH at the end of
>> complete(), as when reaching there all pages should have been flushed.
>>
>> Signed-off-by: Peter Xu <peterx@redhat.com>
>
> Reviewed-by: Fabiano Rosas <farosas@suse.de>

Actually, let's be more clear and make this a:

Tested-by: Fabiano Rosas <farosas@suse.de>

That way I'll remember this went through the same tests as the other
multifd sync changes we made.
Re: [PATCH 1/4] migration/multifd: Avoid the final FLUSH in complete()
Posted by Peter Xu 4 months, 1 week ago
On Thu, Jun 13, 2024 at 11:54:58AM -0300, Fabiano Rosas wrote:
> Fabiano Rosas <farosas@suse.de> writes:
> 
> > Peter Xu <peterx@redhat.com> writes:
> >
> >> We always do the flush when finishing one round of scan, and during
> >> complete() phase we should scan one more round making sure no dirty page
> >> existed.  In that case we shouldn't need one explicit FLUSH at the end of
> >> complete(), as when reaching there all pages should have been flushed.
> >>
> >> Signed-off-by: Peter Xu <peterx@redhat.com>
> >
> > Reviewed-by: Fabiano Rosas <farosas@suse.de>
> 
> Actually, let's be more clear and make this a:
> 
> Tested-by: Fabiano Rosas <farosas@suse.de>
> 
> That way I'll remember this went through the same tests as the other
> multifd sync changes we made.

Or... could I take both? :)  And thanks for checking that.

-- 
Peter Xu