[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-b
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band |
Date: |
Fri, 24 Nov 2017 13:14:53 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
* Peter Xu (address@hidden) wrote:
> So it can get rid of being run on main thread.
>
> Signed-off-by: Peter Xu <address@hidden>
Last time I asked if you were sure that we didn't do locking,
and you explained that we end up just setting up a callback
that happens in the mainloop, and this shouldn't take a lock.
I confirmed this by:
running with -incoming defer
breakpointing in hmp_migrate_incoming
doing migrate_incoming tcp:0:4444
once I hit that breakpointing adding two more breakpoints:
a) qemu_mutex_lock_iothread
b) the end of hmp's handle_hmp_command
and indeed it hit the end of handle_hmp_command without
having hit the qemu_mutex_lock_iothread; so initially that
looks ok.
But then I added a break on pthread_mutex_lock, and I've got
this set caused by qemu_start_incoming_migration sending a
MIGRATION_STATUS_SETUP event:
#1 0x0000555555ba6eba in qemu_mutex_lock (address@hidden <monitor_lock>)
at /home/dgilbert/git/qemu/util/qemu-thread-posix.c:65
#2 0x00005555557f01c1 in monitor_qapi_event_queue (event=QAPI_EVENT_MIGRATION,
qdict=0x555557d93c00, errp=<optimized out>) at
/home/dgilbert/git/qemu/monitor.c:442
440 trace_monitor_protocol_event_queue(event, qdict, evconf->rate);
441
442 qemu_mutex_lock(&monitor_lock);
443
#3 0x0000555555b92722 in qapi_event_send_migration (address@hidden,
errp=0x555556859320 <error_abort>) at qapi-event.c:661
#4 0x0000555555a6159f in qemu_start_incoming_migration (uri=0x555557693f30
"tcp:0:4444", errp=0x7fffffffc700)
at /home/dgilbert/git/qemu/migration/migration.c:253
#5 0x0000555555a641c5 in qmp_migrate_incoming (uri=0x555557693f30
"tcp:0:4444", errp=0x7fffffffc730)
at /home/dgilbert/git/qemu/migration/migration.c:1321
is there anything which protects us there?
Dave
> ---
> qapi/migration.json | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/migration.json b/qapi/migration.json
> index bbc4671ded..95098072dd 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1063,7 +1063,8 @@
> # <- { "return": {} }
> #
> ##
> -{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
> +{ 'command': 'migrate-incoming', 'data': {'uri': 'str' },
> + 'allow-oob': true }
>
> ##
> # @xen-save-devices-state:
> --
> 2.13.6
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- [Qemu-devel] [RFC v4 14/27] monitor: introduce monitor_qmp_respond(), (continued)
- [Qemu-devel] [RFC v4 14/27] monitor: introduce monitor_qmp_respond(), Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 15/27] monitor: let monitor_{suspend|resume} thread safe, Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 16/27] monitor: separate QMP parser and dispatcher, Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 17/27] qmp: add new event "request-dropped", Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 18/27] monitor: send event when request queue full, Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 19/27] qapi: introduce new cmd option "allow-oob", Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 20/27] qmp: support out-of-band (oob) execution, Peter Xu, 2017/11/16
- [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band, Peter Xu, 2017/11/16
- Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band,
Dr. David Alan Gilbert <=
- Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band, Peter Xu, 2017/11/27
- Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band, Dr. David Alan Gilbert, 2017/11/27
- Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band, Peter Xu, 2017/11/27
- Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band, Dr. David Alan Gilbert, 2017/11/27
- Re: [Qemu-devel] [RFC v4 21/27] qmp: let migrate-incoming allow out-of-band, Peter Xu, 2017/11/27
[Qemu-devel] [RFC v4 22/27] qmp: isolate responses into io thread, Peter Xu, 2017/11/16
[Qemu-devel] [RFC v4 23/27] monitor: enable IO thread for (qmp & !mux) typed, Peter Xu, 2017/11/16
[Qemu-devel] [RFC v4 24/27] qmp: add command "x-oob-test", Peter Xu, 2017/11/16