From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V440x-0005Tn-DO for qemu-devel@nongnu.org; Tue, 30 Jul 2013 03:06:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V440s-0006tJ-07 for qemu-devel@nongnu.org; Tue, 30 Jul 2013 03:06:35 -0400 Received: from [2001:41d0:8:2b42::1] (port=50411 helo=greensocs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V440r-0006t8-Q2 for qemu-devel@nongnu.org; Tue, 30 Jul 2013 03:06:29 -0400 Message-ID: <51F765F2.50808@greensocs.com> Date: Tue, 30 Jul 2013 09:06:26 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1374159757-16383-1-git-send-email-fred.konrad@greensocs.com> <51E80B3B.6050604@redhat.com> <51F689E0.9050804@greensocs.com> <51F69B7C.7060201@redhat.com> In-Reply-To: <51F69B7C.7060201@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 0/3] Determinitic behaviour with icount. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , mark.burton@greensocs.com, qemu-devel@nongnu.org On 29/07/2013 18:42, Paolo Bonzini wrote: > Il 29/07/2013 17:27, Frederic Konrad ha scritto: >> On 18/07/2013 17:35, Paolo Bonzini wrote: >>> Il 18/07/2013 17:06, Peter Maydell ha scritto: >>>> On 18 July 2013 16:02, wrote: >>>>> As I said in the last email, we have issues with determinism with >>>>> icount. >>>>> We are wondering if determinism is really ensured with icount? >>>> My opinion is that it *should* be deterministic but it would >>>> be unsurprising if the determinism had got broken along the way. >>> First of all, it can only be deterministic if the guest satisfies (at >>> least) all the following condition: >>> >>> 1) only uses timer that QEMU bases on vm_clock (which means that you >>> should use "-rtc clock=vm"---sorry Fred, didn't think about this in the >>> previous answer); >>> >>> 2) never does any network operation nor any asynchronous disk I/O >>> operation >>> >>> 3) never halts the VCPU waiting for an interrupt >> Hi, >> >> qemu_alarm is making the replay not deterministic too. > What is qemu_alarm? If you mean qemu_alarm_timer, then that means > rt_clock and host_clock (item 1 above)? > > If so, yes, I believe you need to record/replay them. When doing replay > for reverse execution, you certainly want to execute at full speed > without waiting for real time to pass again. > > Paolo Yes, it was what we believed too. :) Thanks, Fred >> We tried to remove those alarms and it seems to replay well (at least >> far better). >> >> So the question is: how we can solve that? >> >> We thought at two possibilities : >> * record/replay them, like IO. >> * base them on our new ic_clock. >> >> Both have drawbacks: >> * record/replay won't make icount more deterministic (run to run). >> * ic_clock speed time is apparently not constant. >> >> Thanks, >> Fred >>