Received: from eggs.gnu.org ([2001:4830:134:3::10]:36417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zefd7-0008Em-66 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 04:42:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zefd3-0000d1-68 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 04:42:21 -0400 Received: from mail.ispras.ru ([83.149.199.45]:52198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zefd2-0000ca-Tx for qemu-devel@nongnu.org; Wed, 23 Sep 2015 04:42:17 -0400 From: "Pavel Dovgaluk" References: <20150917162322.8676.29314.stgit@PASHA-ISP.def.inno> <20150917162439.8676.38290.stgit@PASHA-ISP.def.inno> <56015479.8020403@redhat.com> <1946.37127356163$1442992987@news.gmane.org> <56025DE5.5040600@redhat.com> In-Reply-To: <56025DE5.5040600@redhat.com> Date: Wed, 23 Sep 2015 11:42:17 +0300 Message-ID: <000e01d0f5db$c10ea5f0$432bf1d0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, igor.rubinov@gmail.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, hines@cert.org, alex.bennee@linaro.org, fred.konrad@greensocs.com > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > On 23/09/2015 09:22, Pavel Dovgaluk wrote: > > Sometimes tcg thread halts in qemu_tcg_wait_io_event function, > > waiting for any external event. Virtual clock does not run, because > > warp is not called. warp call in main_loop_wait proceeds virtual > > clock and allows tcg thread to run further. > > Ok, this makes sense! > > Would this work too as a replacement for this patch? No, it doesn't help. It seems that tcg is waiting within qemu_cond_wait function without leaving it. > > diff --git a/cpus.c b/cpus.c > index fbbd17f..9480acc 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -926,6 +926,7 @@ static void qemu_tcg_wait_io_event(CPUState *cpu) > } > > while (iothread_requesting_mutex) { > + qemu_clock_warp(QEMU_CLOCK_VIRTUAL); > qemu_cond_wait(&qemu_io_proceeded_cond, &qemu_global_mutex); > } Pavel Dovgalyuk