From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPjvy-0008ON-7q for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:44:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPjvw-0008MR-U2 for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:44:21 -0500 Received: from [199.232.76.173] (port=57305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPjvw-0008MI-PK for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:44:20 -0500 Received: from fk-out-0910.google.com ([209.85.128.189]:38249) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPjvw-0002Dc-7a for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:44:20 -0500 Received: by fk-out-0910.google.com with SMTP id z23so379527fkz.2 for ; Wed, 21 Jan 2009 12:44:18 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20090121202904.GE5237@const.famille.thibault.fr> References: <20090121200345.GB5237@const.famille.thibault.fr> <20090121202904.GE5237@const.famille.thibault.fr> Date: Wed, 21 Jan 2009 22:44:17 +0200 Message-ID: Subject: Re: [Qemu-devel] [6391] Fix nographic mode and VNC From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On 1/21/09, Samuel Thibault wrote: > Blue Swirl, le Wed 21 Jan 2009 22:16:15 +0200, a =C3=A9crit : > > > On 1/21/09, Samuel Thibault wrote: > > > Blue Swirl, le Wed 21 Jan 2009 19:28:14 +0000, a =C3=A9crit : > > > > > > > +static void nographic_update(void *opaque) > > > > +{ > > > > + uint64_t interval =3D 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 sec= ond > > > 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. > It'd be a shame to have to poll every 30ms all the time because of the > cpu emulation loop, even when we can just select in main_loop_wait > because the cpu is idle. OpenBIOS reads the console in a busy loop, the CPU will never be idle. Maybe the timer period could be scaled automatically: if for X periods there has been no activity on the select() file descriptors, increase the period by factor Y. Also if for X periods there has always been activity, decrease the period.