qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 21/23] multifd: Zero pages transmission


From: Juan Quintela
Subject: Re: [PATCH v4 21/23] multifd: Zero pages transmission
Date: Tue, 25 Jan 2022 10:42:36 +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>
>> 
>> ---
>> 
>> Add comment for offset (dave)
>>              }
>>          }
>>  
>> +        for (int i = 0; i < p->zero_num; i++) {
>> +            memset(p->host + p->zero[i], 0, qemu_target_page_size());
>> +        }
>> +
>
> On the existing code, it tries to avoid doing the memset if the target
> page size matches; that avoids allocating the zero pages on the
> destination host; should we try and do the same here?
>
> Dave

Hi Dave

That only happens on postcopy.
With precopy we have to do the memset, because we can have:

write non zero to page 50
migrate page 50
write zeros to page 50
Another migration pass
If we don't write here, we have garbage on the page.

Or I am missing something?

Later, Juan.




reply via email to

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