From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVKTi-0001vj-BO for qemu-devel@nongnu.org; Mon, 15 Feb 2016 09:50:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVKTd-00037S-7c for qemu-devel@nongnu.org; Mon, 15 Feb 2016 09:50:18 -0500 Received: from mail.ispras.ru ([83.149.199.45]:33098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVKTd-000375-01 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 09:50:13 -0500 From: "Pavel Dovgalyuk" References: <000601d163fb$4cbcae70$e6360b50$@Dovgaluk@ispras.ru> <20160210122816.GB5474@noname.redhat.com> <000a01d16401$be4d31d0$3ae79570$@Dovgaluk@ispras.ru> <20160210132545.GC5474@noname.redhat.com> <001201d16597$fa5de6a0$ef19b3e0$@Dovgaluk@ispras.ru> <20160212135820.GD4828@noname.redhat.com> <003301d167cc$4d7d9480$e878bd80$@ru> <003a01d167d1$42df95f0$c89ec1d0$@ru> <20160215093810.GC5244@noname.str.redhat.com> <004701d167f8$5cbe70f0$163b52d0$@ru> <20160215140635.GF5244@noname.str.redhat.com> In-Reply-To: <20160215140635.GF5244@noname.str.redhat.com> Date: Mon, 15 Feb 2016 17:50:10 +0300 Message-ID: <005601d16800$2b4fe500$81efaf00$@ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Kevin Wolf' Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, igor.rubinov@gmail.com, mark.burton@greensocs.com, real@ispras.ru, hines@cert.org, qemu-devel@nongnu.org, maria.klimushenkova@ispras.ru, stefanha@redhat.com, pbonzini@redhat.com, batuzovk@ispras.ru, alex.bennee@linaro.org, fred.konrad@greensocs.com > From: Kevin Wolf [mailto:kwolf@redhat.com] > > void replay_run_block_event(uint32_t id) > > { > > Request *req; > > if (replay_mode == REPLAY_MODE_PLAY) { > > while (!(req = block_request_find(id))) { > > //aio_poll(bdrv_get_aio_context(req->bs), true); > > usleep(1); > > } > > > qemu_coroutine_enter(req->co, NULL); > > } > > } > > > > > Can you provide more detail about the exact place where it's hanging, > > > both in the coroutine and in the main "coroutine" that executes > > > aio_poll()? I've tried to replace usleep with aio_poll. In this case replay cannot be made, because of recursive mutex lock: aio_poll -> qemu_clock_get_ns -> -> replay_run_block_event -> aio_poll -> qemu_clock_get_ns -> -> Pavel Dovgalyuk