Message ID | 1505375436-28439-16-git-send-email-peterx@redhat.com |
---|---|
State | New |
Headers | show |
Series | QMP: out-of-band (OOB) execution support | expand |
* Peter Xu (peterx@redhat.com) wrote: > So it can get rid of being run on main thread. > > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > qapi/migration.json | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/qapi/migration.json b/qapi/migration.json > index ee2b3b8..dedc4f8 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -986,7 +986,8 @@ > # <- { "return": {} } > # > ## > -{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } } > +{ 'command': 'migrate-incoming', 'data': {'uri': 'str' }, > + 'allow-oob': true } Are you completely convinced migrate-incoming is non-blocking? What about during the tls handshake if tls is enabled? (We only set non-blocking on the fd later) I don't understand in this structure on which thread process_incoming_migration_co gets run. Dave > ## > # @xen-save-devices-state: > -- > 2.7.4 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
On Fri, Sep 15, 2017 at 05:09:28PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (peterx@redhat.com) wrote: > > So it can get rid of being run on main thread. > > > > Signed-off-by: Peter Xu <peterx@redhat.com> > > --- > > qapi/migration.json | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/qapi/migration.json b/qapi/migration.json > > index ee2b3b8..dedc4f8 100644 > > --- a/qapi/migration.json > > +++ b/qapi/migration.json > > @@ -986,7 +986,8 @@ > > # <- { "return": {} } > > # > > ## > > -{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } } > > +{ 'command': 'migrate-incoming', 'data': {'uri': 'str' }, > > + 'allow-oob': true } > > Are you completely convinced migrate-incoming is non-blocking? > What about during the tls handshake if tls is enabled? > (We only set non-blocking on the fd later) IIUC after socket_start_incoming_migration() we are done in qmp_migrate_incoming(), then all the rest of the socket work will all be done in main thread. Note: g_source_attach() along the way in the whole qmp_migrate_incoming() should be using NULL as the second parameter, which means they'll attach the objects all to the default gcontext, which targets to the main thread. > > I don't understand in this structure on which thread > process_incoming_migration_co gets run. IIUC it should be the main thread as well. Thanks,
diff --git a/qapi/migration.json b/qapi/migration.json index ee2b3b8..dedc4f8 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -986,7 +986,8 @@ # <- { "return": {} } # ## -{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } } +{ 'command': 'migrate-incoming', 'data': {'uri': 'str' }, + 'allow-oob': true } ## # @xen-save-devices-state:
So it can get rid of being run on main thread. Signed-off-by: Peter Xu <peterx@redhat.com> --- qapi/migration.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)