Received: from eggs.gnu.org ([209.51.188.92]:45697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjQ2M-0001z3-QM for qemu-devel@nongnu.org; Tue, 15 Jan 2019 09:49:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjQ2L-0003Iy-LE for qemu-devel@nongnu.org; Tue, 15 Jan 2019 09:49:54 -0500 From: Alberto Garcia In-Reply-To: <20190115141800.GB29056@stefanha-x1.localdomain> References: <20190111132416.GI5010@dhcp-200-186.str.redhat.com> <20190114133553.GE7038@stefanha-x1.localdomain> <20190114161525.GA32304@stefanha-x1.localdomain> <20190114163117.GA521@stefanha-x1.localdomain> <20190115141800.GB29056@stefanha-x1.localdomain> Date: Tue, 15 Jan 2019 15:49:25 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] throttle-groups: fix restart coroutine iothread race List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Stefan Hajnoczi , Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz On Tue 15 Jan 2019 03:18:00 PM CET, Stefan Hajnoczi wrote: >> So if my understanding is correct QEMU can be shut down when there >> are iothreads waiting for a mutex. Is that something that we should >> be worried about? > > Nothing joins the iothreads in vl.c:main(). > > The assumption is that anything using iothreads will detach from them. > For example, the vm runstate changes during shutdown so devices can > disable the iothread code path (and this involves draining in-flight > requests). > > My fix effectively does this by waiting for in-flight throttling > restart coroutines. Yeah, it's clear in the case of your fix. Thanks! Berto