From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: Shivam Kumar <shivam.kumar1@nutanix.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] Use multifd state to determine if multifd cleanup is needed
Date: Tue, 08 Oct 2024 15:40:47 -0300 [thread overview]
Message-ID: <87a5fetp3k.fsf@suse.de> (raw)
In-Reply-To: <ZwVJ16JDW_U6fPeo@x1n>
Peter Xu <peterx@redhat.com> writes:
> On Tue, Oct 08, 2024 at 11:20:03AM -0300, Fabiano Rosas wrote:
>> Peter Xu <peterx@redhat.com> writes:
>>
>> > On Mon, Oct 07, 2024 at 03:44:51PM +0000, Shivam Kumar wrote:
>> >> If the client calls the QMP command to reset the migration
>> >> capabilities after the migration status is set to failed or cancelled
>> >
>> > Is cancelled ok?
>> >
>> > Asked because I think migrate_fd_cleanup() should still be in CANCELLING
>> > stage there, so no one can disable multifd capability before that, it
>> > should fail the QMP command.
>> >
>> > But FAILED indeed looks problematic.
>> >
>> > IIUC it's not only to multifd alone - is it a race condition that
>> > migrate_fd_cleanup() can be invoked without migration_is_running() keeps
>> > being true? Then I wonder what happens if a concurrent QMP "migrate"
>> > happens together with migrate_fd_cleanup(), even with multifd always off.
>> >
>> > Do we perhaps need to cleanup everything before the state changes to
>> > FAILED?
>> >
>>
>> Should we make CANCELLED the only terminal state aside from COMPLETED?
>> So migrate_fd_cleanup would set CANCELLED whenever it sees either
>> CANCELLING or FAILED.
>
> I think that may be a major ABI change that can be risky, as we normally
> see CANCELLED to be user's choice.
Ok, I misunderstood your proposal.
>
> If we really want an ABI change, we could also introduce FAILING too, but I
> wonder what I replied in the other email could work without any ABI change,
> but close the gap on this race.
I don't think we want a FAILING state, but indeed something else that
conveys the same meaning as CANCELLING. I have already suggested
something similar in our TODO list[1]. We need a clear indication of
both "cancelling" and "failing" that's decoupled from the state ABI. Of
course we're talking only about "failing" here, we can leave
"cancelling" which is more complex for another time maybe.
What multifd does with ->exiting seems sane to me.
1- https://wiki.qemu.org/ToDo/LiveMigration#Migration_cancel_concurrency
next prev parent reply other threads:[~2024-10-08 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 15:44 [PATCH] Use multifd state to determine if multifd cleanup is needed Shivam Kumar
2024-10-07 16:26 ` Peter Xu
2024-10-08 12:09 ` Shivam Kumar
2024-10-08 14:00 ` Peter Xu
2024-10-08 14:20 ` Fabiano Rosas
2024-10-08 15:03 ` Peter Xu
2024-10-08 18:40 ` Fabiano Rosas [this message]
2024-10-09 10:02 ` Shivam Kumar
2024-10-09 13:19 ` 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=87a5fetp3k.fsf@suse.de \
--to=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shivam.kumar1@nutanix.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).