qmp: Move dispatcher to a coroutine
This moves the QMP dispatcher to a coroutine and runs all QMP command handlers that declare 'coroutine': true in coroutine context so they can avoid blocking the main loop while doing I/O or waiting for other events. For commands that are not declared safe to run in a coroutine, the dispatcher drops out of coroutine context by calling the QMP command handler from a bottom half. Signed-off-by:Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201005155855.256490-10-kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
Showing
- include/qapi/qmp/dispatch.h 1 addition, 0 deletionsinclude/qapi/qmp/dispatch.h
- monitor/monitor-internal.h 4 additions, 2 deletionsmonitor/monitor-internal.h
- monitor/monitor.c 47 additions, 8 deletionsmonitor/monitor.c
- monitor/qmp.c 92 additions, 30 deletionsmonitor/qmp.c
- qapi/qmp-dispatch.c 60 additions, 5 deletionsqapi/qmp-dispatch.c
- qapi/qmp-registry.c 3 additions, 0 deletionsqapi/qmp-registry.c
- util/aio-posix.c 7 additions, 1 deletionutil/aio-posix.c
Loading
Please register or sign in to comment