qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 22/23] multifd: Zero pages transmission


From: Juan Quintela
Subject: Re: [PATCH v3 22/23] multifd: Zero pages transmission
Date: Thu, 02 Dec 2021 17:49:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

"Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
> * Juan Quintela (quintela@redhat.com) wrote:
>> This implements the zero page dection and handling.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  migration/multifd.c | 33 +++++++++++++++++++++++++++++++--
>>  1 file changed, 31 insertions(+), 2 deletions(-)
>> 
>> diff --git a/migration/multifd.c b/migration/multifd.c
>> index 2e4dffd6c6..5c1fc70ce3 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"
>> @@ -277,6 +278,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);
>
> OK, so if I'm understanding correctly here, the packet->offset array
> starts with the 'normals' and then the zeros?
> If so that probably needs a comment somewhere.

Yeap.

> Other than that,

Thanks, Juan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]