[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 20/23] monitor: enable IO thread for (qmp & !mux)
From: |
Peter Xu |
Subject: |
[Qemu-devel] [PATCH v7 20/23] monitor: enable IO thread for (qmp & !mux) typed |
Date: |
Wed, 24 Jan 2018 13:39:54 +0800 |
Start to use dedicate IO thread for QMP monitors that are not using
MUXed chardev.
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
---
monitor.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index eac92c9b86..5b7da2b574 100644
--- a/monitor.c
+++ b/monitor.c
@@ -36,6 +36,7 @@
#include "net/slirp.h"
#include "chardev/char-fe.h"
#include "chardev/char-io.h"
+#include "chardev/char-mux.h"
#include "ui/qemu-spice.h"
#include "sysemu/numa.h"
#include "monitor/monitor.h"
@@ -4579,8 +4580,10 @@ static void monitor_qmp_setup_handlers(void *data)
void monitor_init(Chardev *chr, int flags)
{
Monitor *mon = g_malloc(sizeof(*mon));
+ /* Enable IOThread for QMPs that are not using MUX chardev backends. */
+ bool use_io_thr = (!CHARDEV_IS_MUX(chr)) && (flags & MONITOR_USE_CONTROL);
- monitor_data_init(mon, false, false);
+ monitor_data_init(mon, false, use_io_thr);
qemu_chr_fe_init(&mon->chr, chr, &error_abort);
mon->flags = flags;
--
2.14.3
- [Qemu-devel] [PATCH v7 10/23] qmp: introduce QMPCapability, (continued)
- [Qemu-devel] [PATCH v7 10/23] qmp: introduce QMPCapability, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 11/23] monitor: introduce monitor_qmp_respond(), Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 12/23] monitor: let suspend_cnt be thread safe, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 13/23] monitor: let suspend/resume work even with QMPs, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 14/23] monitor: separate QMP parser and dispatcher, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 15/23] qmp: add new event "command-dropped", Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 16/23] monitor: send event when command queue full, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 17/23] qapi: introduce new cmd option "allow-oob", Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 18/23] qmp: support out-of-band (oob) execution, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 19/23] qmp: isolate responses into io thread, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 20/23] monitor: enable IO thread for (qmp & !mux) typed,
Peter Xu <=
- [Qemu-devel] [PATCH v7 21/23] qmp: add command "x-oob-test", Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 22/23] tests: qmp-test: verify command batching, Peter Xu, 2018/01/24
- [Qemu-devel] [PATCH v7 23/23] tests: qmp-test: add oob test, Peter Xu, 2018/01/24
- Re: [Qemu-devel] [PATCH v7 00/23] QMP: out-of-band (OOB) execution support, Peter Xu, 2018/01/24