From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, "Daniel P . Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 2/6] migration: Kick postcopy threads on cancel
Date: Wed, 04 Dec 2024 16:02:36 -0300 [thread overview]
Message-ID: <87r06ni84z.fsf@suse.de> (raw)
In-Reply-To: <Z1Ch8HpiKMoqILDM@x1n>
Peter Xu <peterx@redhat.com> writes:
> On Mon, Dec 02, 2024 at 07:01:33PM -0300, Fabiano Rosas wrote:
>> Make sure postcopy threads are released when migrate_cancel is
>> issued. Kick the postcopy_pause semaphore and have the fault thread
>> read 'fault_thread_quit' when joining.
>>
>> While here fix the comment mentioning userfault_event_fd.
>>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>
> I remember when working on postcopy, I thought about failing migrate-cancel
> for postcopy in general, rejecting such request. And when working on the
> recover feature, there's no concern on having it being cancelled, because
> the user really shouldn't do that..
>
> The problem is migrate-cancel means crashing the VM on both sides when QEMU
> already goes into postcopy stage.
Well, that's the sillyness of having a cancel command, you can never
know what "cancel" means. The "documentation" says: "Cancel the current
executing migration process", it doesn't mention anything about the
consequences of such action.
>
> If the user wants to crash the VM anyway, an easier way to do is killing on
> both sides.
I don't think this is fair. We expose a "cancel" command, we better do
some cancelling or instead reject the command appropriately, not expect
the user to "know better".
>
> If the user wished to cancel, we should tell them "postcopy cannot be
> cancelled, until complete". That's probably the major reason why people
> think postcopy is dangerous to use..
We could certainly add that restriction, I don't see a problem with
it. That said, what is the actual use case for migrate_cancel? And how
does that compare with yank? I feel like we've been kind of relying on
nobody using those commands really.
One truth that we have (because it's tested) is that the multifd
migration allows migrate_cancel on the source and another migration to
start from it.
(btw, that reminds me that multifd+postcopy will probably break that
test).
>
> Or do we have any use case this could be a valid scenario?
Not that I know of. But you're the postcopy expert =)
next prev parent reply other threads:[~2024-12-04 19:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 22:01 [PATCH 0/6] migration: Fix issues during qmp_migrate_cancel Fabiano Rosas
2024-12-02 22:01 ` [PATCH 1/6] tests/qtest/migration: Introduce migration_test_add_suffix Fabiano Rosas
2024-12-04 18:44 ` Peter Xu
2024-12-02 22:01 ` [PATCH 2/6] migration: Kick postcopy threads on cancel Fabiano Rosas
2024-12-04 18:39 ` Peter Xu
2024-12-04 19:02 ` Fabiano Rosas [this message]
2024-12-04 19:39 ` Peter Xu
2024-12-04 20:02 ` Daniel P. Berrangé
2024-12-04 20:40 ` Fabiano Rosas
2024-12-04 20:59 ` Peter Xu
2024-12-04 20:51 ` Peter Xu
2024-12-04 21:01 ` Fabiano Rosas
2024-12-04 21:11 ` Peter Xu
2024-12-05 10:52 ` Daniel P. Berrangé
2024-12-05 13:18 ` Fabiano Rosas
2024-12-05 15:03 ` Peter Xu
2024-12-05 15:44 ` Daniel P. Berrangé
2024-12-05 15:40 ` Daniel P. Berrangé
2024-12-02 22:01 ` [PATCH 3/6] migration: Fix postcopy listen thread exit Fabiano Rosas
2024-12-02 22:01 ` [PATCH 4/6] migration: Make sure postcopy recovery doesn't hang when cancelling Fabiano Rosas
2024-12-02 22:01 ` [PATCH 5/6] migration: Fix hang after error in destination setup phase Fabiano Rosas
2024-12-04 18:44 ` Peter Xu
2024-12-04 19:05 ` Fabiano Rosas
2024-12-02 22:01 ` [PATCH 6/6] tests/qtest/migration: Add a cancel test 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=87r06ni84z.fsf@suse.de \
--to=farosas@suse.de \
--cc=berrange@redhat.com \
--cc=peterx@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.