Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J3vNx-00058J-Eb for qemu-devel@nongnu.org; Sun, 16 Dec 2007 10:26:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J3vNu-00055D-QI for qemu-devel@nongnu.org; Sun, 16 Dec 2007 10:26:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J3vNu-000553-M4 for qemu-devel@nongnu.org; Sun, 16 Dec 2007 10:26:30 -0500 Received: from 0xc2c0b63d.fbbft3nxf1.bf-dhcp.tele.dk ([194.192.182.61] helo=smtp.hotelhot.dk) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J3vNu-0006gW-9d for qemu-devel@nongnu.org; Sun, 16 Dec 2007 10:26:30 -0500 Received: from smtp.hotelhot.dk (localhost [127.0.0.1]) by smtp.hotelhot.dk (Postfix) with ESMTP id 987A214092 for ; Sun, 16 Dec 2007 16:26:25 +0100 (CET) Received: from [192.168.0.251] (dhcp251.kalibalik.dk [192.168.0.251]) by smtp.hotelhot.dk (Postfix) with ESMTP id 5604014085 for ; Sun, 16 Dec 2007 16:26:25 +0100 (CET) Message-ID: <476543A0.9090207@flac.kalibalik.dk> Date: Sun, 16 Dec 2007 16:26:24 +0100 From: Anders MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu vl.c References: <200712161430.35113.paul@codesourcery.com> In-Reply-To: <200712161430.35113.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 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? 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 and to me it seems that this might affect the case that you describe. Cheers, Anders.