qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 21/23] multifd: Support for zero pages transmission


From: Juan Quintela
Subject: Re: [PATCH v3 21/23] multifd: Support for zero pages transmission
Date: Thu, 02 Dec 2021 17:52:17 +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:
>> "Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
>> > * Juan Quintela (quintela@redhat.com) wrote:
>> >> "Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
>> >> > * Juan Quintela (quintela@redhat.com) wrote:
>> >> >> This patch adds counters and similar.  Logic will be added on the
>> >> >> following patch.
>> >> >> 
>> >> >> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> >> >> ---
>> >> >>  migration/multifd.h    | 13 ++++++++++++-
>> >> >>  migration/multifd.c    | 22 +++++++++++++++++++---
>> >> >>  migration/trace-events |  2 +-
>> >> >>  3 files changed, 32 insertions(+), 5 deletions(-)
>> >> >> 
>> >> >> diff --git a/migration/multifd.h b/migration/multifd.h
>> >> >> index 39e55d7f05..973315b545 100644
>> >> >> --- a/migration/multifd.h
>> >> >> +++ b/migration/multifd.h
>> >> >> @@ -49,7 +49,10 @@ typedef struct {
>> >> >>      /* size of the next packet that contains pages */
>> >> >>      uint32_t next_packet_size;
>> >> >>      uint64_t packet_num;
>> >> >> -    uint64_t unused[4];    /* Reserved for future use */
>> >> >> +    /* zero pages */
>> >> >> +    uint32_t zero_pages;
>> >> >
>> >> > Had you considered just adding a flag, MULTIFD_FLAG_ZERO to the packet?
>> >> 
>> >> I *have* to also add the flag.
>> >
>> > I meant can't you add a flag to say that this whole packet is zero pages
>> > and then you only need one counter.
>> 
>> No, in general packets are going to transmit *both*, zero pages and
>> normal pages.  It depends on the content that one receives.
>
> OK, I'd wondered if it was just easier to send two packets; but fine.

Zero pages travel for free.

To have initial packets to the same size, we always send an array of 128
offsets in the packet (I am speaking x86_64 here).

And as we receive an array of 128 pages, we have space there for the
zero pages, no need of a different packet at all.

Later, Juan.




reply via email to

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