From patchwork Tue Sep 25 08:15:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Bumiller X-Patchwork-Id: 10613607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C97513A4 for ; Tue, 25 Sep 2018 08:16:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23BCA29AFF for ; Tue, 25 Sep 2018 08:16:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 186A729B1E; Tue, 25 Sep 2018 08:16:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C75029AFF for ; Tue, 25 Sep 2018 08:16:34 +0000 (UTC) Received: from localhost ([::1]:51582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4iWG-0006FD-7z for patchwork-qemu-devel@patchwork.kernel.org; Tue, 25 Sep 2018 04:16:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4iV6-0005DY-Hj for qemu-devel@nongnu.org; Tue, 25 Sep 2018 04:15:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4iV3-0007yu-7y for qemu-devel@nongnu.org; Tue, 25 Sep 2018 04:15:20 -0400 Received: from proxmox-new.maurer-it.com ([212.186.127.180]:21652) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g4iV2-0007sc-Ro for qemu-devel@nongnu.org; Tue, 25 Sep 2018 04:15:17 -0400 Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CB6544244A; Tue, 25 Sep 2018 10:15:08 +0200 (CEST) From: Wolfgang Bumiller To: qemu-devel@nongnu.org Date: Tue, 25 Sep 2018 10:15:05 +0200 Message-Id: <20180925081507.11873-1-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.186.127.180 Subject: [Qemu-devel] [PATCH rebased 0/2] delay monitor iothread creation 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: Markus Armbruster , Peter Xu , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The early monitor iothread creation conflicts with the -daemonize option causing crashes at shutdown of a daemonized qemu instance. These patches will delay the creation to when a monitor using it is actually spawned, which AFAICT only happens after the os_daemonize() call. While the second patch depends on the first one, the first is a consistency cleanup on its own, therefore split out. Wolfgang Bumiller (2): monitor: guard iothread access by mon->use_io_thread monitor: delay monitor iothread creation monitor.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-)