From: Juan Quintela <quintela@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, peterx@redhat.com, alex.bennee@linaro.org
Subject: Re: [Qemu-devel] [PATCH] migration: Cleanup during exit
Date: Wed, 27 Feb 2019 21:32:11 +0100 [thread overview]
Message-ID: <87pnrdrn04.fsf@trasno.org> (raw)
In-Reply-To: <20190227164900.16378-1-dgilbert@redhat.com> (David Alan Gilbert's message of "Wed, 27 Feb 2019 16:49:00 +0000")
"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Currently we cleanup the migration object as we exit main after the
> main_loop finishes; however if there's a migration running things
> get messy and we can end up with the migration thread still trying
> to access freed structures.
>
> We now take a ref to the object around the migration thread itself,
> so the act of dropping the ref during exit doesn't cause us to lose
> the state until the thread quits.
>
> Cancelling the migration during migration also tries to get the thread
> to quit.
>
> We do this a bit earlier; so hopefully migration gets out of the way
> before all the devices etc are freed.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
next prev parent reply other threads:[~2019-02-27 20:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 16:49 [Qemu-devel] [PATCH] migration: Cleanup during exit Dr. David Alan Gilbert (git)
2019-02-27 20:32 ` Juan Quintela [this message]
2019-02-28 6:28 ` Peter Xu
2019-02-28 11:40 ` Dr. David Alan Gilbert
2019-02-28 12:01 ` Daniel P. Berrangé
2019-02-28 12:28 ` Dr. David Alan Gilbert
2019-03-01 3:27 ` Peter Xu
2019-03-01 10:11 ` Dr. David Alan Gilbert
2019-03-04 7:52 ` Peter Xu
2019-02-28 10:49 ` Alex Bennée
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=87pnrdrn04.fsf@trasno.org \
--to=quintela@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=dgilbert@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.