[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 3/3] migration: write zero pages when postcopy enabled
From: |
Peter Xu |
Subject: |
Re: [PATCH v10 3/3] migration: write zero pages when postcopy enabled |
Date: |
Mon, 12 May 2025 11:06:02 -0400 |
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
[PATCH v10 2/3] tests/qtest/migration: add postcopy tests with multifd, Prasad Pandit, 2025/05/08