From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9pAD-0002Yv-Vg for qemu-devel@nongnu.org; Tue, 12 Apr 2011 21:46:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9lTX-0002I7-8Q for qemu-devel@nongnu.org; Tue, 12 Apr 2011 17:50:20 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:49657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9lTW-0002Fm-UU for qemu-devel@nongnu.org; Tue, 12 Apr 2011 17:50:19 -0400 Received: by bwz16 with SMTP id 16so90061bwz.4 for ; Tue, 12 Apr 2011 14:50:17 -0700 (PDT) Date: Tue, 12 Apr 2011 23:50:14 +0200 From: "Edgar E. Iglesias" Message-ID: <20110412215014.GC8375@laped.lan> References: <1302597850-10708-1-git-send-email-pbonzini@redhat.com> <4DA41ACB.8090403@siemens.com> <4DA4530F.2070905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DA4530F.2070905@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 0/4] Fix -icount with iothread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Jan Kiszka , qemu-devel@nongnu.org On Tue, Apr 12, 2011 at 03:26:39PM +0200, Paolo Bonzini wrote: > On 04/12/2011 11:26 AM, Jan Kiszka wrote: > > On 2011-04-12 10:44, Paolo Bonzini wrote: > >> This series finally fixes -icount with iothread and avoids deadlocks > >> due to the vm_clock not making progress when the VM is stopped. > >> The crux of the fix is in patch 1, while patch 2 implements the > >> "clock warping" that fixes deadlocks in v2. Clock warping uses > >> the nanosecond resolution rt_clock timers introduced by my previous > >> series. > >> > >> With this in place, patch 3 can revert the previous attempt(s). > >> Finally, patch 4 makes the icount code clearer by finishing the > >> bugfix/reorganization of qemu_next_deadline vs. qemu_next_alarm_deadline. > >> > >> v1->v2: > >> reordered patches, renamed qemu_next_deadline > >> > >> v2->v3: > >> introduced warp timer > >> > >> Paolo Bonzini (4): > >> really fix -icount in the iothread case > >> enable vm_clock to "warp" in the iothread+icount case > >> Revert wrong fixes for -icount in the iothread case > >> qemu_next_deadline should not consider host-time timers > >> > >> cpus.c | 13 ++++- > >> qemu-common.h | 1 + > >> qemu-timer.c | 145 ++++++++++++++++++++++++++++++++++++++++++--------------- > >> qemu-timer.h | 3 +- > >> 4 files changed, 121 insertions(+), 41 deletions(-) > >> > > > > On first glance, I've spotted a view coding style issues. Try checkpatch > > (maybe excluding patch 3). > > Will repost, testing is welcome in the meanwhile! The logic of the patches looks good to me, but it would be nice if you could add a comment in the code regarding why we do the "warping". I think parts of it could be based from the commit message. I also tested the code and it works beautifully for my testcases! iothread & icount ran faster than icount without iothread. Thanks alot, cheers