qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Prasad Pandit <ppandit@redhat.com>
Cc: qemu-devel@nongnu.org, farosas@suse.de, berrange@redhat.com,
	Prasad Pandit <pjp@fedoraproject.org>
Subject: Re: [PATCH v5 3/5] migration: enable multifd and postcopy together
Date: Tue, 11 Feb 2025 10:20:11 -0500	[thread overview]
Message-ID: <Z6tqq5jpbDHsVtVw@x1.local> (raw)
In-Reply-To: <CAE8KmOy+C7QzDHJ5hfWg93zSV0ctGYYz30qsQTe-=+iq1vA+fQ@mail.gmail.com>

On Tue, Feb 11, 2025 at 02:34:07PM +0530, Prasad Pandit wrote:
> On Mon, 10 Feb 2025 at 22:29, Peter Xu <peterx@redhat.com> wrote:
> > Yes, and I suggest a rename or introduce a new helper, per previous reply.
> 
> * Okay, will try it.
> 
> > I didn't follow, sorry - do you mean this patch is correct on dropping the
> > mapped-ram check? I don't yet understand how it can work if without.
> 
> * It goes for channel peek if '!migrate_mapped_ram', ie. when
> mapped_ram is not set. When it is enabled, likely it just falls into
> the multifd channel, like other tls/file channels. I'll see if we have
> to add a check for mapped_ram stream, like tls/file one.
> 
> > I meant tls channels should have these magics too.  Do you mean they're not?
> 
> * Yes. AFAIU, tls/file channels don't send magic values.

Please double check whether TLS will send magics.  AFAICT, they should.

> 
> > No I don't think so.
> > Flushing sending side makes sure send buffer is empty.  It doesn't
> > guarantee recv buffer is empty on the other side.
> 
> * A simple 'flush' operation is not supposed to guarantee reception on
> the destination side. It is just a 'flush' operation. If we want to
> _confirm_ whether the pages sent to the destination are received or
> not, then the destination side should send an 'Acknowledgement' to the
> source side. Is there such a mechanism in place currently?

No.  We need to figure out a way to do that properly, and that's exactly
what I mentioned as one of the core changes we need in this series, which
is still missing.  We may or may not need an ACK message.  Please think
about it.

> 
> > >
> > > * If all multifd pages are sent/written/flushed onto the multifd
> > > channels before postcopy_start() is called, then multifd pages should
> > > not arrive at the destination after postcopy starts IIUC.  If that is
> > > happening, we need a reproducer for such a case. Do we have such a
> > > reproducer?
> >
> > With or without a reproducer, we need to at least justify it in theory.  If
> > it doesn't even work in theory, it's a problem.
> 
> * The theory that both multifd and postcopy channels use the same
> underlying network wire; And in that multifd pages get delayed, but
> postcopy pages don't, is not understandable. There must be something
> else happening in such a case, which a reproducer could help with.

Please consider the case where multifd recv threads may get scheduled out
on dest host during precopy phase, not getting chance to be scheduled until
postcopy already started running on dst, then the recv thread can stumble
upon a page that was sent during precopy.  As long as that can be always
avoided, I think we should be good.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2025-02-11 15:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 12:27 [PATCH v5 0/5] Allow to enable multifd and postcopy migration together Prasad Pandit
2025-02-05 12:27 ` [PATCH v5 1/5] migration/multifd: move macros to multifd header Prasad Pandit
2025-02-06 22:41   ` Peter Xu
2025-02-05 12:27 ` [PATCH v5 2/5] migration: refactor ram_save_target_page functions Prasad Pandit
2025-02-06 22:43   ` Peter Xu
2025-02-07 12:19     ` Fabiano Rosas
2025-02-05 12:27 ` [PATCH v5 3/5] migration: enable multifd and postcopy together Prasad Pandit
2025-02-06 23:16   ` Peter Xu
2025-02-07 10:32     ` Prasad Pandit
2025-02-07 15:45       ` Peter Xu
2025-02-08 10:36         ` Prasad Pandit
2025-02-10 16:59           ` Peter Xu
2025-02-11  9:04             ` Prasad Pandit
2025-02-11 15:20               ` Peter Xu [this message]
2025-02-12 13:27                 ` Prasad Pandit
2025-02-12 14:37                   ` Peter Xu
2025-02-12 17:36                     ` Prasad Pandit
2025-02-12 17:52                       ` Peter Xu
2025-02-05 12:27 ` [PATCH v5 4/5] tests/qtest/migration: add postcopy tests with multifd Prasad Pandit
2025-02-05 12:27 ` [PATCH v5 5/5] tests/qtest/migration: consolidate set capabilities Prasad Pandit
2025-02-06 22:44   ` Peter Xu
2025-02-07  8:59     ` Prasad Pandit
2025-02-07 22:01   ` Fabiano Rosas

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=Z6tqq5jpbDHsVtVw@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).