From patchwork Thu Sep 14 07:50:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 813739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xtB0x4H8wz9s83 for ; Thu, 14 Sep 2017 18:05:36 +1000 (AEST) Received: from localhost ([::1]:46254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsP9R-0003fe-8K for incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 04:05:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsOwb-0007Pk-Tt for qemu-devel@nongnu.org; Thu, 14 Sep 2017 03:52:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsOwY-000884-R9 for qemu-devel@nongnu.org; Thu, 14 Sep 2017 03:52:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsOwY-00081T-LS for qemu-devel@nongnu.org; Thu, 14 Sep 2017 03:52:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7312B7EBD5; Thu, 14 Sep 2017 07:52:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7312B7EBD5 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=peterx@redhat.com Received: from pxdev.xzpeter.org.com (dhcp-15-224.nay.redhat.com [10.66.15.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0B36619BF; Thu, 14 Sep 2017 07:52:03 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Thu, 14 Sep 2017 15:50:33 +0800 Message-Id: <1505375436-28439-13-git-send-email-peterx@redhat.com> In-Reply-To: <1505375436-28439-1-git-send-email-peterx@redhat.com> References: <1505375436-28439-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 14 Sep 2017 07:52:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 12/15] monitor: enable IO thread for (qmp & !mux) typed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Fam Zheng , Juan Quintela , Markus Armbruster , peterx@redhat.com, mdroth@linux.vnet.ibm.com, Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lure?= =?utf-8?q?au?= , Paolo Bonzini , "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Start to use dedicate IO thread for QMP monitors that are not using MUXed chardev. Signed-off-by: Peter Xu --- monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index f649d6a..599ea36 100644 --- a/monitor.c +++ b/monitor.c @@ -36,6 +36,7 @@ #include "net/net.h" #include "net/slirp.h" #include "chardev/char-fe.h" +#include "chardev/char-mux.h" #include "ui/qemu-spice.h" #include "sysemu/numa.h" #include "monitor/monitor.h" @@ -4211,7 +4212,7 @@ void monitor_init(Chardev *chr, int flags) Monitor *mon = g_malloc(sizeof(*mon)); GMainContext *context; - monitor_data_init(mon, false, false); + monitor_data_init(mon, false, !CHARDEV_IS_MUX(chr)); qemu_chr_fe_init(&mon->chr, chr, &error_abort); mon->flags = flags;