From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, "Fabiano Rosas" <farosas@suse.de>,
"Dr . David Alan Gilbert" <dave@treblig.org>,
"Eric Blake" <eblake@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Andrey Drobyshev" <andrey.drobyshev@virtuozzo.com>,
peterx@redhat.com, "Stefan Hajnoczi" <stefanha@redhat.com>
Subject: [PATCH RFC 00/11] migration/block: disk activation rewrite
Date: Tue, 3 Dec 2024 19:51:27 -0500 [thread overview]
Message-ID: <20241204005138.702289-1-peterx@redhat.com> (raw)
I started looking at this problem as a whole when reviewing Fabiano's
series, especially the patch (for a QEMU crash [1]):
https://lore.kernel.org/r/20241125144612.16194-5-farosas@suse.de
The proposed patch could work, but it's unwanted to add such side effect to
migration. So I start to think about whether we can provide a cleaner
approach, at least remove that "we must active the disk for migration"
dependency, because migration really don't need the disks to be active..
It's also a pure wish that, if bdrv_inactivate_all() could be benign to be
called even if all disks are already inactive. Then problem also gone.
After all, similar call on bdrv_activate_all() upon all-active disks is all
fine. I hope that wish could still be fair.
And when I was looking at that, I found more things spread all over the
place on disk activation. I decided to clean all of them up, while
hopefully fixing the QEMU crash [1] too.
So this is what I came up with as of today. Marking RFC as of now, just to
collect some feedbacks first. At least I'd like to go with one more patch
to deprecate late-block-active - not deprecating its function, but make it
always happen (which is the default as of now for Libvirt), which should
hopefully be migration-ABI-safe.
With the help of Fabiano's test cases, I at least am sure this series works
for the ping pong migrations, and all existing qtests.
Let me know, thanks.
[1] https://gitlab.com/qemu-project/qemu/-/issues/2395
Fabiano Rosas (4):
tests/qtest/migration: Move more code under only_target
tests/qtest/migration: Don't use hardcoded strings for -serial
tests/qtest/migration: Support cleaning up only one side of migration
tests/qtest/migration: Test successive migrations
Peter Xu (7):
migration: Add helper to get target runstate
migration/block: Make late-block-active the default
migration/block: Apply late-block-active behavior to postcopy
migration/block: Fix possible race with block_inactive
migration/block: Merge block reactivations for fail/cancel
migration/block: Extend the migration_block_* API to dest side
migration/block: Apply the migration_block_* API to postcopy
migration/migration.h | 33 ++++-
tests/qtest/migration-helpers.h | 2 +
migration/migration.c | 177 +++++++++++-----------
migration/savevm.c | 32 ++--
tests/qtest/migration-helpers.c | 8 +
tests/qtest/migration-test.c | 252 +++++++++++++++++++++++++-------
6 files changed, 344 insertions(+), 160 deletions(-)
--
2.47.0
next reply other threads:[~2024-12-04 0:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 0:51 Peter Xu [this message]
2024-12-04 0:51 ` [PATCH RFC 01/11] migration: Add helper to get target runstate Peter Xu
2024-12-04 0:51 ` [PATCH RFC 02/11] migration/block: Make late-block-active the default Peter Xu
2024-12-04 0:51 ` [PATCH RFC 03/11] migration/block: Apply late-block-active behavior to postcopy Peter Xu
2024-12-04 0:51 ` [PATCH RFC 04/11] migration/block: Fix possible race with block_inactive Peter Xu
2024-12-04 0:51 ` [PATCH RFC 05/11] migration/block: Merge block reactivations for fail/cancel Peter Xu
2024-12-04 0:51 ` [PATCH RFC 06/11] migration/block: Extend the migration_block_* API to dest side Peter Xu
2024-12-04 14:49 ` Peter Xu
2024-12-04 0:51 ` [PATCH RFC 07/11] migration/block: Apply the migration_block_* API to postcopy Peter Xu
2024-12-04 0:51 ` [PATCH RFC 08/11] tests/qtest/migration: Move more code under only_target Peter Xu
2024-12-04 0:51 ` [PATCH RFC 09/11] tests/qtest/migration: Don't use hardcoded strings for -serial Peter Xu
2024-12-04 19:11 ` Fabiano Rosas
2024-12-04 0:51 ` [PATCH RFC 10/11] tests/qtest/migration: Support cleaning up only one side of migration Peter Xu
2024-12-04 0:51 ` [PATCH RFC 11/11] tests/qtest/migration: Test successive migrations Peter Xu
2024-12-04 17:25 ` [PATCH RFC 00/11] migration/block: disk activation rewrite 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=20241204005138.702289-1-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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).