From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4Nif-0007Ss-E5 for qemu-devel@nongnu.org; Mon, 17 Dec 2007 16:41:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4Nie-0007S2-HA for qemu-devel@nongnu.org; Mon, 17 Dec 2007 16:41:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4Nie-0007Ru-D2 for qemu-devel@nongnu.org; Mon, 17 Dec 2007 16:41:48 -0500 Received: from il.qumranet.com ([82.166.9.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4Nid-0008Ai-Ut for qemu-devel@nongnu.org; Mon, 17 Dec 2007 16:41:48 -0500 Message-ID: <4766EBDB.1020308@qumranet.com> Date: Mon, 17 Dec 2007 23:36:27 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu vl.c References: <200712161430.35113.paul@codesourcery.com> <476543A0.9090207@flac.kalibalik.dk> <200712170058.35739.paul@codesourcery.com> In-Reply-To: <200712170058.35739.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anders Paul Brook wrote: > On Sunday 16 December 2007, Anders wrote: > >> Paul Brook wrote: >> >>>> Redundant timer rearm optimisation by Anders Melchiorsen. >>>> >>> I think this is incorrect. >>> >>> When a timer is modified, we need to rearm the host timer immediately. We >>> can not wait for the old timer to fire, or for execution to fall back to >>> the main_loop_wait. Consider the case where the guest adds a timer >>> interrupt and immediately enters a tight loop - Quite a common operation >>> when calibrating a software delay loop. The timer won't be rearmed until >>> some other event occurs. It the system is otherwise quiescent and you're >>> not using SDL output it may never occur. >>> >> Hi Paul, >> >> I am certainly open to it not being correct, but currently I fail to see >> how it changes the scenario that you mention. The rearming is moved away >> from qemu_run_timers(), not qemu_mod_timer(). Can you elaborate? >> > > It's possible that this code has always been broken. You changes make it much > more obviously so. > > I'm merging qemu-cvs into the kvm repository now, and with this commit in, kvm will hang after about a minute. Attaching to it with gdb or strace will cause it to resume, so this is very likely a missing signal problem. (qemu will happily run with this patch; kvm is much more sensitive to missed signals). -- Any sufficiently difficult bug is indistinguishable from a feature.