]> xenbits.xensource.com Git - qemu-xen.git/commit
migration/multifd: Fix clearing of mapped-ram zero pages
authorFabiano Rosas <farosas@suse.de>
Thu, 21 Mar 2024 20:12:42 +0000 (17:12 -0300)
committerPeter Xu <peterx@redhat.com>
Fri, 22 Mar 2024 16:12:08 +0000 (12:12 -0400)
commit8fa1a21c6edc2bf7de85984944848ab9ac49e937
treea0a504149552aa65690de34a83de565180a739bc
parent910c1647364f0c8c1f680f260a2b7d52587bc38e
migration/multifd: Fix clearing of mapped-ram zero pages

When the zero page detection is done in the multifd threads, we need
to iterate the second part of the pages->offset array and clear the
file bitmap for each zero page. The piece of code we merged to do that
is wrong.

The reason this has passed all the tests is because the bitmap is
initialized with zeroes already, so clearing the bits only really has
an effect during live migration and when a data page goes from having
data to no data.

Fixes: 303e6f54f9 ("migration/multifd: Implement zero page transmission on the multifd thread.")
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240321201242.6009-1-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/multifd.c