From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zef66-0004hv-Ra for qemu-devel@nongnu.org; Wed, 23 Sep 2015 04:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zef62-0001rs-Ff for qemu-devel@nongnu.org; Wed, 23 Sep 2015 04:08:14 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:33983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zef62-0001rU-8s for qemu-devel@nongnu.org; Wed, 23 Sep 2015 04:08:10 -0400 Received: by wicfx3 with SMTP id fx3so226050242wic.1 for ; Wed, 23 Sep 2015 01:08:09 -0700 (PDT) Sender: Paolo Bonzini 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> From: Paolo Bonzini Message-ID: <56025DE5.5040600@redhat.com> Date: Wed, 23 Sep 2015 10:08:05 +0200 MIME-Version: 1.0 In-Reply-To: <1946.37127356163$1442992987@news.gmane.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Pavel Dovgaluk , 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 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? Paolo 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); }