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 v1 3/4] migration: refactor ram_save_target_page functions
Date: Wed, 27 Nov 2024 09:19:48 -0300 [thread overview]
Message-ID: <878qt4na1n.fsf@suse.de> (raw)
In-Reply-To: <CAE8KmOwfzFyBWfq_Vhr-hjT4jGQQqi6_gZwkNGtd8SVLxhi0QQ@mail.gmail.com>
Prasad Pandit <ppandit@redhat.com> writes:
> On Wed, 27 Nov 2024 at 02:49, Fabiano Rosas <farosas@suse.de> wrote:
>> This patch should be just the actual refactoring on top of master, with
>> no mention to postcopy at all.
>
> * Okay. We'll have to ensure that it is merged before multifd+postcopy change.
That's ok, just put it at the start of the series.
>
>> > + if (migrate_multifd() && !migration_in_postcopy()
>> > + && (!migrate_multifd_flush_after_each_section()
>> > + || migrate_mapped_ram())) {
>>
>> This is getting out of hand. We can't keep growing this condition every
>> time something new comes up. Any ideas?
>
> * In 'v0' this series, !migration_in_postcopy() was added to
> migrate_multifd(), which worked, but was not okay.
>
> * Another could be to define a new helper/macro to include above 3-4
> checks. Because migrate_multifd(),
> migrate_multifd_flush_after_each_section() and migrate_mapped_ram()
> appear together at multiple points. But strangely the equation is not
> the same. Sometimes migrate_mapped_ram() is 'true' and sometimes it is
> 'false', so a combined helper may not work. It is all to accommodate
> different workings of multifd IIUC, if it and precopy used the same
> protocol/stream, maybe such conditionals would go away automatically.
>
>> Yes, although I wonder if we should keep documenting this when we only
>> call this function for a single page and it always returns at most 1.
>> > if (page_dirty) {
>> > /* Be strict to return code; it must be 1, or what else? */
>>
>> ... this^ comment, for instance.
>>
>
> * Okay, can remove them.
>
> So to confirm: this refactoring patch should be a separate one by
> itself? And then in the following multifd+postcopy series we just add
> !migration_in_postcopy() check to it?
It doesn't need to be a single patch submission, it could be a patch at
the start of this series. It's just that it needs to logically do only
one thing, which is to move the code around without adding new bits that
don't exist in current master (a strict definition of refactoring). The
multifd+postcopy changes come in a subsequent patch so it's clear that
one patch was just shuffling code around while the rest is part of the
feature enablement.
>
> Thank you.
> ---
> - Prasad
next prev parent reply other threads:[~2024-11-27 12:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 11:57 [PATCH v1 0/4] Allow to enable multifd and postcopy migration together Prasad Pandit
2024-11-26 11:57 ` [PATCH v1 1/4] migration/multifd: move macros to multifd header Prasad Pandit
2024-11-26 11:57 ` [PATCH v1 2/4] migration: remove multifd check with postcopy Prasad Pandit
2024-11-26 21:12 ` Fabiano Rosas
2024-11-27 11:43 ` Prasad Pandit
2024-11-26 11:57 ` [PATCH v1 3/4] migration: refactor ram_save_target_page functions Prasad Pandit
2024-11-26 21:18 ` Fabiano Rosas
2024-11-27 11:42 ` Prasad Pandit
2024-11-27 12:19 ` Fabiano Rosas [this message]
2024-11-28 10:43 ` Prasad Pandit
2024-11-27 14:12 ` Fabiano Rosas
2024-11-28 10:18 ` Prasad Pandit
2024-11-28 13:19 ` Fabiano Rosas
2024-12-02 9:44 ` Prasad Pandit
2024-12-02 14:12 ` Fabiano Rosas
2024-12-03 5:40 ` Prasad Pandit
2024-12-05 22:26 ` Peter Xu
2024-11-26 11:57 ` [PATCH v1 4/4] migration: enable multifd and postcopy together Prasad Pandit
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=878qt4na1n.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 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.