All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: "Fabiano Rosas" <farosas@suse.de>,
	"Wang, Lei" <lei4.wang@intel.com>,
	qemu-devel@nongnu.org, "Avihai Horon" <avihaih@nvidia.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [RFC PATCH 6/7] migration/multifd: Move payload storage out of the channel parameters
Date: Wed, 17 Jul 2024 17:30:35 -0400	[thread overview]
Message-ID: <Zpg3-6ywAzSlcg69@x1n> (raw)
In-Reply-To: <9fd06f90-2957-4a4b-b652-c5f768bca4cb@maciej.szmigiero.name>

On Wed, Jul 17, 2024 at 11:07:17PM +0200, Maciej S. Szmigiero wrote:
> On 17.07.2024 21:00, Peter Xu wrote:
> > On Tue, Jul 16, 2024 at 10:10:25PM +0200, Maciej S. Szmigiero wrote:
> > > > > > > The comment I removed is slightly misleading to me too, because right now
> > > > > > > active_slot contains the data hasn't yet been delivered to multifd, so
> > > > > > > we're "putting it back to free list" not because of it's free, but because
> > > > > > > we know it won't get used until the multifd send thread consumes it
> > > > > > > (because before that the thread will be busy, and we won't use the buffer
> > > > > > > if so in upcoming send()s).
> > > > > > > 
> > > > > > > And then when I'm looking at this again, I think maybe it's a slight
> > > > > > > overkill, and maybe we can still keep the "opaque data" managed by multifd.
> > > > > > > One reason might be that I don't expect the "opaque data" payload keep
> > > > > > > growing at all: it should really be either RAM or device state as I
> > > > > > > commented elsewhere in a relevant thread, after all it's a thread model
> > > > > > > only for migration purpose to move vmstates..
> > > > > > 
> > > > > > Some amount of flexibility needs to be baked in. For instance, what
> > > > > > about the handshake procedure? Don't we want to use multifd threads to
> > > > > > put some information on the wire for that as well?
> > > > > 
> > > > > Is this an orthogonal question?
> > > > 
> > > > I don't think so. You say the payload data should be either RAM or
> > > > device state. I'm asking what other types of data do we want the multifd
> > > > channel to transmit and suggesting we need to allow room for the
> > > > addition of that, whatever it is. One thing that comes to mind that is
> > > > neither RAM or device state is some form of handshake or capabilities
> > > > negotiation.
> > > 
> > > The RFC version of my multifd device state transfer patch set introduced
> > > a new migration channel header (by Avihai) for clean and extensible
> > > migration channel handshaking but people didn't like so it was removed in v1.
> > 
> > Hmm, I'm not sure this is relevant to the context of discussion here, but I
> > confess I didn't notice the per-channel header thing in the previous RFC
> > series.  Link is here:
> > 
> > https://lore.kernel.org/r/636cec92eb801f13ba893de79d4872f5d8342097.1713269378.git.maciej.szmigiero@oracle.com
> 
> The channel header patches were dropped because Daniel didn't like them:
> https://lore.kernel.org/qemu-devel/Zh-KF72Fe9oV6tfT@redhat.com/
> https://lore.kernel.org/qemu-devel/Zh_6W8u3H4FmGS49@redhat.com/

Ah I missed that too when I quickly went over the old series, sorry.

I think what Dan meant was that we'd better do that with the handshake
work, which should cover more than this.  I've no problem with that.

It's just that sooner or later, we should provide something more solid than
commit 6720c2b327 ("migration: check magic value for deciding the mapping
of channels").

> 
> > Maciej, if you want, you can split that out of the seriess. So far it looks
> > like a good thing with/without how VFIO tackles it.
> 
> Unfortunately, these Avihai's channel header patches obviously impact wire
> protocol and are a bit of intermingled with the rest of the device state
> transfer patch set so it would be good to know upfront whether there is
> some consensus to (re)introduce this new channel header (CCed Daniel, too).

When I mentioned posting it separately, it'll still not be relevant to the
VFIO series. IOW, I think below is definitely not needed (and I think we're
on the same page now to reuse multifd threads as generic channels, so
there's no issue now):

https://lore.kernel.org/qemu-devel/027695db92ace07d2d6ee66da05f8e85959fd46a.1713269378.git.maciej.szmigiero@oracle.com/

So I assume we should leave that for later for whoever refactors the
handshake process.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2024-07-17 21:31 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 21:21 [RFC PATCH 0/7] migration/multifd: Introduce storage slots Fabiano Rosas
2024-06-20 21:21 ` [RFC PATCH 1/7] migration/multifd: Reduce access to p->pages Fabiano Rosas
2024-06-21 14:42   ` Peter Xu
2024-06-20 21:21 ` [RFC PATCH 2/7] migration/multifd: Pass in MultiFDPages_t to file_write_ramblock_iov Fabiano Rosas
2024-06-20 21:21 ` [RFC PATCH 3/7] migration/multifd: Replace p->pages with an opaque pointer Fabiano Rosas
2024-06-20 21:21 ` [RFC PATCH 4/7] migration/multifd: Move pages accounting into multifd_send_zero_page_detect() Fabiano Rosas
2024-06-20 21:21 ` [RFC PATCH 5/7] migration/multifd: Isolate ram pages packet data Fabiano Rosas
2024-07-19 14:40   ` Fabiano Rosas
2024-06-20 21:21 ` [RFC PATCH 6/7] migration/multifd: Move payload storage out of the channel parameters Fabiano Rosas
2024-06-27  3:27   ` Wang, Lei
2024-06-27 14:40     ` Peter Xu
2024-06-27 15:17       ` Peter Xu
2024-07-10 16:10       ` Fabiano Rosas
2024-07-10 19:10         ` Peter Xu
2024-07-10 20:16           ` Fabiano Rosas
2024-07-10 21:55             ` Peter Xu
2024-07-11 14:12               ` Fabiano Rosas
2024-07-11 16:11                 ` Peter Xu
2024-07-11 19:37                   ` Fabiano Rosas
2024-07-11 20:27                     ` Peter Xu
2024-07-11 21:12                       ` Fabiano Rosas
2024-07-11 22:06                         ` Peter Xu
2024-07-12 12:44                           ` Fabiano Rosas
2024-07-12 15:37                             ` Peter Xu
2024-07-18 19:39                   ` Fabiano Rosas
2024-07-18 21:12                     ` Peter Xu
2024-07-18 21:27                       ` Fabiano Rosas
2024-07-18 21:52                         ` Peter Xu
2024-07-18 22:32                           ` Fabiano Rosas
2024-07-19 14:04                             ` Peter Xu
2024-07-19 16:54                               ` Fabiano Rosas
2024-07-19 17:58                                 ` Peter Xu
2024-07-19 21:30                                   ` Fabiano Rosas
2024-07-16 20:10             ` Maciej S. Szmigiero
2024-07-17 19:00               ` Peter Xu
2024-07-17 21:07                 ` Maciej S. Szmigiero
2024-07-17 21:30                   ` Peter Xu [this message]
2024-06-20 21:21 ` [RFC PATCH 7/7] migration/multifd: Hide multifd slots implementation Fabiano Rosas
2024-06-21 14:44 ` [RFC PATCH 0/7] migration/multifd: Introduce storage slots Maciej S. Szmigiero
2024-06-21 15:04   ` Fabiano Rosas
2024-06-21 15:31     ` Maciej S. Szmigiero
2024-06-21 15:56       ` Peter Xu
2024-06-21 17:40         ` Maciej S. Szmigiero
2024-06-21 20:54           ` Peter Xu
2024-06-23 20:25             ` Maciej S. Szmigiero
2024-06-23 20:45               ` Peter Xu

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=Zpg3-6ywAzSlcg69@x1n \
    --to=peterx@redhat.com \
    --cc=avihaih@nvidia.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=lei4.wang@intel.com \
    --cc=mail@maciej.szmigiero.name \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.