From: Fabiano Rosas <farosas@suse.de>
To: Prasad Pandit <ppandit@redhat.com>
Cc: qemu-devel@nongnu.org, peterx@redhat.com, berrange@redhat.com,
Prasad Pandit <pjp@fedoraproject.org>
Subject: Re: [PATCH v6 2/4] migration: enable multifd and postcopy together
Date: Thu, 20 Feb 2025 10:36:17 -0300 [thread overview]
Message-ID: <87jz9k91ri.fsf@suse.de> (raw)
In-Reply-To: <CAE8KmOyzkLS3zvb7a32CUVJuvS-VEkZwSAfJUZwQqT-xiZLnJw@mail.gmail.com>
Prasad Pandit <ppandit@redhat.com> writes:
> Hello,
>
> On Wed, 19 Feb 2025 at 22:53, Fabiano Rosas <farosas@suse.de> wrote:
>> I don't see anything stopping postcopy_start() from being called in the
>> source in relation to multifd recv threads being setup in the
>> destination. So far it seems possible that the source is opening the
>> preempt channel while multifd still hasn't seen all threads. There's
>> also pre-7.2 machines which create the postcopy channel early.
>
> * If we can not predict the sequence/timings of when different types
> of connections are initiated and processed, maybe source and
> destination QEMUs could work in tandem. ie. before initiating a
> connection, source QEMU could send an 'initiate' message saying I'm
> initiating 'X' connection. Only when destination QEMU says 'okay',
> source QEMU could proceed with actual connection.
>
> QEMU-A -> Initiate connection type X -> QEMU-B
> QEMU-A <- okay <- <- QEMU-B
> QEMU-A -> connect type X -> QEMU-B
>
> (thinking out loud)
>
This is more or less the handshake idea. Or at least it could be
included in that work.
I have parked the handshake idea for now because I'm not seeing an
immediate need for it and there are more pressing issues to be dealt
with first such as bugs and coordinating the new features (and their
possible outcomings) that IMO need to be looked at first.
>>>> > * migration_needs_multiple_sockets()
>>> Then it should return 'True' when both migrate_multifd() and postcopy_preempt() are enabled.
>> Why?
>
> * I was thinking multiple_sockets is multiple types of sockets:
> multifd & postcopy. But it seems here multiple sockets is any type of
> multiple sockets.
>
Yes this means main channel + others.
>> I thought you meant the CH_MAIN stuff. So now I don't know what you
>> mean. You want to do away with multifd?
>
> * Yes, CH_DEFAULT -> CH_MAIN was introduced in this series to identify
> channels and accordingly call relevant functions.
>
> * Not to do away with multifd, but more of making it same as the main
> channel, ex: virsh migrate --threads <N> N = 1...255. All precopy
> threads/connections behave the same. Differentiation of precopy and
> postcopy shall still exist, because they operate/work in opposite
> directions.
>
I'm not opposed to that idea. When I started working with migration I
had the impression that was the direction and that we could put every
workload in a pool of multifd threads. Now, knowing the code better, I'm
not sure that's feasible. Specially the dependence on a "main" channel
seems difficult to do away with. It's also somewhat convenient to have a
maint thread. But we could still attempt to group extra threads, such as
what we're doing with the new thread pool in the device state series. At
least thread management could be done entirely in a separate pool, main
channel and all.
>> Continue with this patch and fix the stuff I mentioned. You can ignore
>> the first two paragraphs of that reply.
>>
>> https://lore.kernel.org/r/87y0y4tf5q.fsf@suse.de
>>
>> I still think we need to test that preempt + multifd scenario, but it
>> should be easy to write a test for that once the series is in more of a
>> final shape.
>
> * Okay.
>
>> We can't add magic values, as we've discussed.
>
> Okay.
>
> Thank you.
> ---
> - Prasad
next prev parent reply other threads:[~2025-02-20 13:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-15 12:31 [PATCH v6 0/4] Allow to enable multifd and postcopy migration together Prasad Pandit
2025-02-15 12:31 ` [PATCH v6 1/4] migration/multifd: move macros to multifd header Prasad Pandit
2025-02-15 12:31 ` [PATCH v6 2/4] migration: enable multifd and postcopy together Prasad Pandit
2025-02-17 21:49 ` Fabiano Rosas
2025-02-18 8:17 ` Prasad Pandit
2025-02-18 14:22 ` Fabiano Rosas
2025-02-19 11:57 ` Prasad Pandit
2025-02-19 17:22 ` Fabiano Rosas
2025-02-20 9:47 ` Prasad Pandit
2025-02-20 13:36 ` Fabiano Rosas [this message]
2025-02-21 8:44 ` Prasad Pandit
2025-02-18 11:17 ` Juraj Marcin
2025-02-19 7:13 ` Prasad Pandit
2025-02-15 12:31 ` [PATCH v6 3/4] tests/qtest/migration: consolidate set capabilities Prasad Pandit
2025-02-17 15:17 ` Fabiano Rosas
2025-02-18 8:53 ` Prasad Pandit
2025-02-15 12:31 ` [PATCH v6 4/4] tests/qtest/migration: add postcopy tests with multifd Prasad Pandit
2025-02-17 15:33 ` Fabiano Rosas
2025-02-18 8:58 ` Prasad Pandit
2025-02-18 14:28 ` Fabiano Rosas
2025-02-25 7:25 ` Prasad Pandit
2025-02-25 13:07 ` 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=87jz9k91ri.fsf@suse.de \
--to=farosas@suse.de \
--cc=berrange@redhat.com \
--cc=peterx@redhat.com \
--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).