From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J44Kd-0001BN-7f for qemu-devel@nongnu.org; Sun, 16 Dec 2007 19:59:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J44KY-00019w-RR for qemu-devel@nongnu.org; Sun, 16 Dec 2007 19:59:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J44KY-00019t-MD for qemu-devel@nongnu.org; Sun, 16 Dec 2007 19:59:38 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J44KU-0007pH-5P for qemu-devel@nongnu.org; Sun, 16 Dec 2007 19:59:38 -0500 From: Paul Brook Subject: Re: [Qemu-devel] qemu vl.c Date: Mon, 17 Dec 2007 00:58:35 +0000 References: <200712161430.35113.paul@codesourcery.com> <476543A0.9090207@flac.kalibalik.dk> In-Reply-To: <476543A0.9090207@flac.kalibalik.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712170058.35739.paul@codesourcery.com> 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 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. > There was a previous patch to remove the rearming when timers are modified, > > http://cvs.savannah.gnu.org/viewvc/qemu/vl.c?root=qemu&view=log#rev1.345 I think this this is unrealted.