qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Prasad Pandit <ppandit@redhat.com>
Cc: Fabiano Rosas <farosas@suse.de>,
	qemu-devel@nongnu.org, berrange@redhat.com,
	Prasad Pandit <pjp@fedoraproject.org>
Subject: Re: [PATCH v10 3/3] migration: write zero pages when postcopy enabled
Date: Mon, 12 May 2025 11:06:02 -0400	[thread overview]
Message-ID: <aCIOWo36zJeCxTJO@x1.local> (raw)
In-Reply-To: <CAE8KmOwFDJhFE6wJpTfDBAG4mJ-Xjsfh8VJwqVYLzT3gGZLZUA@mail.gmail.com>

On Mon, May 12, 2025 at 11:56:31AM +0530, Prasad Pandit wrote:
> Hi,
> 
> On Fri, 9 May 2025 at 20:41, Peter Xu <peterx@redhat.com> wrote:
> > Isn't that what multifd is doing already?
> > typedef struct {
> >     ...
> >     /*
> >      * This array contains the pointers to:
> >      *  - normal pages (initial normal_pages entries)
> >      *  - zero pages (following zero_pages entries)
> >      */
> >     uint64_t offset[];
> > } __attribute__((packed)) MultiFDPacket_t;
> > Or maybe I missed what you meant.
> 
> * Why are we memsetting zero pages on the receive side? What I'm
> trying to get at is, if destination memory is zero-initialised at the
> beginning of migration, we might be able to do away with this
> memset(3) call and this optimisation altogether. All zero page entries
> could point to the same zero page as well, if we don't want to
> preallocate all zero pages at start.

I didn't follow, sorry.

It's still uncertain to me whether the initial pages would be zero before
migration touching it.  I'll need to check some day, because it looks a
matter too as long as we avoid memset in the 1st round.  But I don't
understand what you meant by "do away with memset... altogether".

What is the change you're suggesting?

-- 
Peter Xu



  reply	other threads:[~2025-05-12 15:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 12:28 [PATCH v10 0/3] Allow to enable multifd and postcopy migration together Prasad Pandit
2025-05-08 12:28 ` [PATCH v10 1/3] migration: enable multifd and postcopy together Prasad Pandit
2025-05-08 14:06   ` Fabiano Rosas
2025-05-08 12:28 ` [PATCH v10 2/3] tests/qtest/migration: add postcopy tests with multifd Prasad Pandit
2025-05-08 19:04   ` Peter Xu
2025-05-09  5:26     ` Prasad Pandit
2025-05-09 14:30       ` Peter Xu
2025-05-13  6:20         ` Prasad Pandit
2025-05-08 12:28 ` [PATCH v10 3/3] migration: write zero pages when postcopy enabled Prasad Pandit
2025-05-08 13:57   ` Fabiano Rosas
2025-05-08 15:40     ` Peter Xu
2025-05-09  6:04       ` Prasad Pandit
2025-05-09 15:11         ` Peter Xu
2025-05-12  6:26           ` Prasad Pandit
2025-05-12 15:06             ` Peter Xu [this message]
2025-05-09  5:31     ` Prasad Pandit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCIOWo36zJeCxTJO@x1.local \
    --to=peterx@redhat.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=pjp@fedoraproject.org \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).