From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] migration: Trivial cleanups for postcopy
Date: Mon, 5 May 2025 16:53:31 -0400 [thread overview]
Message-ID: <aBklSyqZ39QSPXmf@x1.local> (raw)
In-Reply-To: <20250416134356.29879-3-farosas@suse.de>
On Wed, Apr 16, 2025 at 10:43:56AM -0300, Fabiano Rosas wrote:
> Some general cleanups of silly things that were left behind when
> refactoring code.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> migration/migration.c | 28 ++++++++++------------------
> 1 file changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index d46e776e24..89b1de0ab5 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2732,19 +2732,15 @@ static int postcopy_start(MigrationState *ms, Error **errp)
> }
>
> /*
> - * in Finish migrate and with the io-lock held everything should
> + * in FINISH_MIGRATE and with the BQL held everything should
> * be quiet, but we've potentially still got dirty pages and we
> * need to tell the destination to throw any pages it's already received
> * that are dirty
> */
> - if (migrate_postcopy_ram()) {
> - ram_postcopy_send_discard_bitmap(ms);
> - }
> + ram_postcopy_send_discard_bitmap(ms);
IIUC it was from:
commit 58110f0acb1a33e2bc60a2f1b26d2690a92e8a14
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: Mon Jul 10 19:30:16 2017 +0300
migration: split common postcopy out of ram postcopy
I need to confess I know nothing about migrate_dirty_bitmaps().. and I
still think the name is not well chosen - migration definitely has its own
dirty bitmap, and it has nothing to do with block layer..
Obviously, it was for postcopy support of block layer stuff, but I don't
know who is using it, how, and when..
Is people using this feature? Maybe we should have an unit test, and a
doc? Copying Vladimir.
>
> - if (migrate_postcopy_ram()) {
> - /* Ping just for debugging, helps line traces up */
> - qemu_savevm_send_ping(ms->to_dst_file, 2);
> - }
> + /* Ping just for debugging, helps line traces up */
> + qemu_savevm_send_ping(ms->to_dst_file, 2);
>
> /*
> * While loading the device state we may trigger page transfer
> @@ -2774,9 +2770,7 @@ static int postcopy_start(MigrationState *ms, Error **errp)
> goto fail_closefb;
> }
>
> - if (migrate_postcopy_ram()) {
> - qemu_savevm_send_ping(fb, 3);
> - }
> + qemu_savevm_send_ping(fb, 3);
>
> qemu_savevm_send_postcopy_run(fb);
>
> @@ -2807,13 +2801,11 @@ static int postcopy_start(MigrationState *ms, Error **errp)
>
> migration_downtime_end(ms);
>
> - if (migrate_postcopy_ram()) {
> - /*
> - * Although this ping is just for debug, it could potentially be
> - * used for getting a better measurement of downtime at the source.
> - */
> - qemu_savevm_send_ping(ms->to_dst_file, 4);
> - }
> + /*
> + * Although this ping is just for debug, it could potentially be
> + * used for getting a better measurement of downtime at the source.
> + */
> + qemu_savevm_send_ping(ms->to_dst_file, 4);
>
> if (migrate_release_ram()) {
> ram_postcopy_migrated_memory_release(ms);
> --
> 2.35.3
>
--
Peter Xu
next prev parent reply other threads:[~2025-05-05 20:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 13:43 [PATCH 0/2] migration: A couple of cleanups Fabiano Rosas
2025-04-16 13:43 ` [PATCH 1/2] migration/multifd: Fix received packets tracepoint Fabiano Rosas
2025-05-05 21:01 ` Peter Xu
2025-05-05 21:51 ` Fabiano Rosas
2025-05-06 13:05 ` Peter Xu
2025-04-16 13:43 ` [PATCH 2/2] migration: Trivial cleanups for postcopy Fabiano Rosas
2025-05-05 20:53 ` Peter Xu [this message]
2025-04-23 11:02 ` [PATCH 0/2] migration: A couple of cleanups Juraj Marcin
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=aBklSyqZ39QSPXmf@x1.local \
--to=peterx@redhat.com \
--cc=farosas@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).