From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: "Prasad Pandit" <ppandit@redhat.com>,
qemu-devel@nongnu.org,
"Maciej S . Szmigiero" <mail@maciej.szmigiero.name>,
"Cédric Le Goater" <clg@redhat.com>
Subject: Re: [PATCH 1/2] migration: Add some documentation for multifd
Date: Thu, 20 Mar 2025 14:12:35 -0300 [thread overview]
Message-ID: <8734f7bp8c.fsf@suse.de> (raw)
In-Reply-To: <Z9w6s1XkDw6Qpr2v@x1.local>
Peter Xu <peterx@redhat.com> writes:
> On Thu, Mar 20, 2025 at 11:45:29AM -0300, Fabiano Rosas wrote:
>> There's a bunch of other issues as well:
>>
>> - no clear distinction between what should go in the header and what
>> should go in the packet.
>>
>> - the header taking up one slot in the iov, which should in theory be
>> responsibility of the client
>>
>> - the whole multifd_ops situation which doesn't allow a clear interface
>> between multifd and client
>>
>> - the lack of uniformity between send/recv in regards to doing I/O from
>> multifd code or from client code
>>
>> - the recv having two different modes of operation, socket and file
>
> I can't say I know the answer of all of them, but to me the last one is
> kind of by design - obviously the old multifd was designed to be more or
> less event driven on dest side, but that doesn't play well on files.
>
Yes, it's entirely by design. But it does create an extra hurdle in the
end. The event driven model requires metadata to inform the IO thread
what to do with the data collected (write to RAM at address X). The
other model doesn't require that as it has a payload already included,
so it just populates the fields. The problem is that we tied file
migration with !packets, but if we want to use iovs all around, we'd
still want packets (due to magic and version) although it'd be way
easier to collect the actual data in MultiFDRecvData instead of passing
information through the header and then doing the work at ->recv().
> To be fair, I didn't invent multifd, but IMHO Juan did a great job
> designing it from scratch, at least it has a bunch of benefits
> comparing to the old protocol especially on perf side (even though
> when initially proposed I was not a fan of how the locking was
> designed.. but it should be much easier to understand after previous
> refactors).
>
Good point. My rant means no demerit at all to the current design, I'm
just objectively pointing out the parts I think are getting in the way.
> And just to say, we can change the code or protocol in whatever way we want
> if that could make it better. So instead of the rant (which is still
> welcomed whenever you feel like :), we can go for whatever you see fit with
> compat properties (and if with a handshake, that's even less of a concern).
Point taken (on the HS as well).
next prev parent reply other threads:[~2025-03-20 17:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 13:42 [PATCH 0/2] migration: multifd documentation Fabiano Rosas
2025-03-07 13:42 ` [PATCH 1/2] migration: Add some documentation for multifd Fabiano Rosas
2025-03-07 17:27 ` Peter Xu
2025-03-07 19:06 ` Fabiano Rosas
2025-03-07 22:15 ` Peter Xu
2025-03-10 14:24 ` Fabiano Rosas
2025-03-10 15:22 ` Peter Xu
2025-03-10 19:27 ` Fabiano Rosas
2025-03-20 12:06 ` Prasad Pandit
2025-03-20 13:38 ` Fabiano Rosas
2025-03-20 11:50 ` Prasad Pandit
2025-03-20 14:45 ` Fabiano Rosas
2025-03-20 15:56 ` Peter Xu
2025-03-20 17:12 ` Fabiano Rosas [this message]
2025-03-21 10:47 ` Prasad Pandit
2025-03-21 14:04 ` Fabiano Rosas
2025-03-24 11:14 ` Prasad Pandit
2025-03-07 13:42 ` [PATCH 2/2] migration: Move compression docs under multifd Fabiano Rosas
2025-03-07 17:28 ` 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=8734f7bp8c.fsf@suse.de \
--to=farosas@suse.de \
--cc=clg@redhat.com \
--cc=mail@maciej.szmigiero.name \
--cc=peterx@redhat.com \
--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).