From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSFVi-00038X-9l for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:56:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSFVU-0002tW-UK for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:56:02 -0500 Received: from [199.232.76.173] (port=43087 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSFVT-0002s6-FG for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:55:55 -0500 Received: from mx20.gnu.org ([199.232.41.8]:36417) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSFVQ-0005Cg-RW for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:55:53 -0500 Received: from mail-qy0-f194.google.com ([209.85.221.194]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRwlj-0004AU-DH for qemu-devel@nongnu.org; Mon, 04 Jan 2010 18:55:27 -0500 Received: by qyk32 with SMTP id 32so6426311qyk.4 for ; Mon, 04 Jan 2010 15:54:26 -0800 (PST) Message-ID: <4B427FA5.40701@codemonkey.ws> Date: Mon, 04 Jan 2010 17:54:13 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1261382970-23251-1-git-send-email-pbonzini@redhat.com> <1261382970-23251-12-git-send-email-pbonzini@redhat.com> <4B424E95.4040806@codemonkey.ws> <20100104200116.GB21311@redhat.com> In-Reply-To: <20100104200116.GB21311@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Paolo Bonzini , qemu-devel@nongnu.org On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: > On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: > >> On 12/21/2009 02:09 AM, Paolo Bonzini wrote: >> >>> Make the timer subsystem register its own bottom half instead of >>> placing the bottom half code in the heart of the main loop. To >>> test if an alarm timer is pending, just check if the bottom half is >>> scheduled. >>> >>> Signed-off-by: Paolo Bonzini >>> >> I'm not a huge fan of this for a couple reasons. The first is that it >> introduces a subtle semantic change. Previously, timers always ran >> before bottom halves whereas after this change, timers may run after >> some bottoms halves but before others. While this should be okay in >> principle, in practice, I'm sure it'll introduce regressions. I'd be >> very surprised if cris wasn't affected by this. >> >> But more importantly, I think timer dispatch needs to be part of the >> select loop. malc has a git tree that replaces host alarm timers with >> select() timeouts. >> > Where is that tree? > http://repo.or.cz/w/qemu/malc.git mtloop > IMO we need that, I am not sure all code is as signal-safe > as it should be. At least crashes that I saw with winxp install > seem to be related to signal handling. > Regards, Anthony Liguori