From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPn3R-0004D1-RT for qemu-devel@nongnu.org; Wed, 21 Jan 2009 19:04:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPn3P-0004Ay-SA for qemu-devel@nongnu.org; Wed, 21 Jan 2009 19:04:17 -0500 Received: from [199.232.76.173] (port=56577 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPn3P-0004Ao-Pc for qemu-devel@nongnu.org; Wed, 21 Jan 2009 19:04:15 -0500 Received: from mx20.gnu.org ([199.232.41.8]:50847) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPn3P-0002VV-DZ for qemu-devel@nongnu.org; Wed, 21 Jan 2009 19:04:15 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPn3O-0003HY-65 for qemu-devel@nongnu.org; Wed, 21 Jan 2009 19:04:14 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [6391] Fix nographic mode and VNC Date: Thu, 22 Jan 2009 00:04:10 +0000 References: <20090121202904.GE5237@const.famille.thibault.fr> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901220004.11338.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: Blue Swirl > > > > > +static void nographic_update(void *opaque) > > > > > > > > > > +{ > > > > > + uint64_t interval = GUI_REFRESH_INTERVAL; > > > > > + > > > > > + qemu_mod_timer(nographic_timer, interval + > > > > > qemu_get_clock(rt_clock)); +} > > > > > > > > Maybe less often than 33 times per second? SDL uses 2 times per > > > > second when the window is minimized. > > > > > > I just tried: it's not enough, the serial console is unusably slow. > > > > Mmm, I haven't followed everything so I probably misunderstand, but I > > guess you are talking about a serial console on stdio, shouldn't we > > already be monitoring the stdin fd to break the cpu emulation loop? > > Some other way, like SIGIO or IO worker thread, may work too. It may > also be a big change. Using a side effect of the the gui refresh timer to implement IO polling is absolutely the wrong way to fix things. All IO should be event driven. If it isn't then then it needs fixing. The polling timeout is determined by timeout = 5000 in vl.c. Paul