From: Juan Quintela <quintela@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-devel@nongnu.org, Ilya Leoshkevich <iii@linux.ibm.com>,
qemu-block@nongnu.org,
Alex Williamson <alex.williamson@redhat.com>,
Fam Zheng <fam@euphon.net>, Eric Blake <eblake@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Halil Pasic <pasic@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Eric Farman <farman@linux.ibm.com>,
qemu-s390x@nongnu.org, John Snow <jsnow@redhat.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH 3/3] migration: Remove _only suffix for res_postcopy/precopy
Date: Tue, 14 Feb 2023 19:22:23 +0100 [thread overview]
Message-ID: <87cz6c5cps.fsf@secure.mitica> (raw)
In-Reply-To: <6a3cfdab-ff8e-d07a-dd86-ce17eb5dc623@yandex-team.ru> (Vladimir Sementsov-Ogievskiy's message of "Tue, 14 Feb 2023 18:27:14 +0300")
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> wrote:
> On 08.02.23 16:57, Juan Quintela wrote:
>> Once that res_compatible is removed, they don't make sense anymore.
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>> include/migration/register.h | 18 ++++++++----------
>> migration/savevm.h | 8 ++++----
>> hw/s390x/s390-stattrib.c | 7 +++----
>> hw/vfio/migration.c | 10 ++++------
>> migration/block-dirty-bitmap.c | 6 +++---
>> migration/block.c | 7 +++----
>> migration/ram.c | 18 ++++++++----------
>> migration/savevm.c | 24 ++++++++++--------------
>> 8 files changed, 43 insertions(+), 55 deletions(-)
>> diff --git a/include/migration/register.h
>> b/include/migration/register.h
>> index a958a92a0f..4a4a6d7174 100644
>> --- a/include/migration/register.h
>> +++ b/include/migration/register.h
>> @@ -47,22 +47,20 @@ typedef struct SaveVMHandlers {
>> /* This runs outside the iothread lock! */
>> int (*save_setup)(QEMUFile *f, void *opaque);
>> /* Note for save_live_pending:
>> - * - res_precopy_only is for data which must be migrated in precopy phase
>> + * - res_precopy is for data which must be migrated in precopy phase
>> * or in stopped state, in other words - before target vm start
>> - * - res_postcopy_only is for data which must be migrated in postcopy phase
>> + * - res_postcopy is for data which must be migrated in postcopy phase
>> * or in stopped state, in other words - after source vm stop
>
>
> That's now wrong. "postcopy" is everything except "precopy", as it
> includes "compat". Really, for RAM, it can be copied in precopy too,
> and it is copied in precopy until user run command
> migrate-start-postcopy. (In contrast: block-dirty-bitmap cannot
> migrate in precopy at all, it migrate only in stopped state or in
> postcopy).
>
> So, finally:
>
> "precopy"
>
> definition:
> - must be migrated in precopy or in stopped state
> - in other words: must be migrated before target start
> - in other words: can't be migrated in postcopy
> - in other words: can't be migrated after target start
>
> "postcopy"
>
> definition:
> - can migrate in postcopy
> - in other words: can migrate after target start
> some properties:
> - probably can be migrated in precopy (like RAM), or, may be not (like block-dirty-bitmap)
> - of course, can be migrated in stopped state
What about (with latest naming)
must_precopy:
* must be migrated in precopy or in stopped state
* i.e. must be migrated before target start
can_postcopy:
* can migrate in postcopy or in stopped state
* i.e. can migrate after target start
* some can also be migrated during precopy (RAM)
* some must be migrated after source stops (block-dirty-bitmap)
> To be absolutely clear, we may rename them to "not_postcopyable" and "postcopyable".
I hate negatives when naming variables.
What about: must_precopy and can_postcopy?
Later, Juan.
next prev parent reply other threads:[~2023-02-14 18:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 13:57 [PATCH 0/3] Remove res_compatible parameter Juan Quintela
2023-02-08 13:57 ` [PATCH 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only Juan Quintela
2023-02-09 17:36 ` Vladimir Sementsov-Ogievskiy
2023-02-09 18:10 ` Juan Quintela
2023-02-14 15:04 ` Vladimir Sementsov-Ogievskiy
2023-02-14 15:47 ` Juan Quintela
2023-02-15 9:08 ` Juan Quintela
2023-02-15 11:36 ` Vladimir Sementsov-Ogievskiy
2023-02-08 13:57 ` [PATCH 2/3] migration: Remove unused res_compatible Juan Quintela
2023-02-14 15:09 ` Vladimir Sementsov-Ogievskiy
2023-02-14 18:14 ` Juan Quintela
2023-02-08 13:57 ` [PATCH 3/3] migration: Remove _only suffix for res_postcopy/precopy Juan Quintela
2023-02-14 15:27 ` Vladimir Sementsov-Ogievskiy
2023-02-14 16:06 ` unsubscribe " McDowell, Jadon
2023-02-14 18:22 ` Juan Quintela [this message]
2023-02-14 18:32 ` Vladimir Sementsov-Ogievskiy
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=87cz6c5cps.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=jsnow@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
/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).