On Wed, Jan 31, 2024 at 9:22 PM Peter Xu <pet...@redhat.com> wrote: > > On Thu, Jan 04, 2024 at 12:44:35AM +0000, Hao Xiang wrote: > > From: Juan Quintela <quint...@redhat.com> > > > > This implements the zero page dection and handling. > > > > Signed-off-by: Juan Quintela <quint...@redhat.com> > > --- > > migration/multifd.c | 41 +++++++++++++++++++++++++++++++++++++++-- > > migration/multifd.h | 5 +++++ > > 2 files changed, 44 insertions(+), 2 deletions(-) > > > > diff --git a/migration/multifd.c b/migration/multifd.c > > index 5a1f50c7e8..756673029d 100644 > > --- a/migration/multifd.c > > +++ b/migration/multifd.c > > @@ -11,6 +11,7 @@ > > */ > > > > #include "qemu/osdep.h" > > +#include "qemu/cutils.h" > > #include "qemu/rcu.h" > > #include "exec/target_page.h" > > #include "sysemu/sysemu.h" > > @@ -279,6 +280,12 @@ static void multifd_send_fill_packet(MultiFDSendParams > > *p) > > > > packet->offset[i] = cpu_to_be64(temp); > > } > > + for (i = 0; i < p->zero_num; i++) { > > + /* there are architectures where ram_addr_t is 32 bit */ > > + uint64_t temp = p->zero[i]; > > + > > + packet->offset[p->normal_num + i] = cpu_to_be64(temp); > > + } > > } > > I think changes like this needs to be moved into the previous patch. I got > quite confused when reading previous one and only understood what happens > until now. Fabiano, if you're going to pick these ones out and post > separately, please also consider. Perhaps squashing them together? >
Discussed with Fabiano on a separate thread here https://lore.kernel.org/all/CAAYibXi=WB5wfvLFM0b=d9ojf66lb7ftgonzzz-tvk4rbbx...@mail.gmail.com/ I am moving the original multifd zero page checking changes into a seperate patchset. There is some necessary refactoring work on the top of the original series. I will send that out this week. > -- > Peter Xu >