mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
migration: let incoming side use thread context
The old incoming migration is running in main thread and default gcontext. With the new qio_channel_add_watch_full() we can now let it run in the thread's own gcontext (if there is one). Currently this patch does nothing alone. But when any of the incoming migration is run in another iothread (e.g., the upcoming migrate-recover command), this patch will bind the incoming logic to the iothread instead of the main thread (which may already get page faulted and hanged). RDMA is not considered for now since it's not even using the QIO watch framework at all. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180502104740.12123-2-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
@ -65,9 +65,8 @@ void exec_start_incoming_migration(const char *command, Error **errp)
|
||||
}
|
||||
|
||||
qio_channel_set_name(ioc, "migration-exec-incoming");
|
||||
qio_channel_add_watch(ioc,
|
||||
G_IO_IN,
|
||||
exec_accept_incoming_migration,
|
||||
NULL,
|
||||
NULL);
|
||||
qio_channel_add_watch_full(ioc, G_IO_IN,
|
||||
exec_accept_incoming_migration,
|
||||
NULL, NULL,
|
||||
g_main_context_get_thread_default());
|
||||
}
|
||||
|
Reference in New Issue
Block a user