From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPjPj-0004Rk-4d for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:11:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPjPe-0004Nf-6n for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:11:02 -0500 Received: from [199.232.76.173] (port=53014 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPjPe-0004NZ-42 for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:10:58 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:7496 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPjPd-0007XX-Nl for qemu-devel@nongnu.org; Wed, 21 Jan 2009 15:10:57 -0500 Message-ID: <4977804E.70705@eu.citrix.com> Date: Wed, 21 Jan 2009 20:06:38 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: Extremely slow graphic updates References: <20090119162633.GO29175@csclub.uwaterloo.ca> <4975B3F6.6050706@eu.citrix.com> <200901201811.19920.paul@codesourcery.com> <200901210150.17344.paul@codesourcery.com> <20090121152259.GG29175@csclub.uwaterloo.ca> In-Reply-To: <20090121152259.GG29175@csclub.uwaterloo.ca> Content-Type: text/plain; charset=UTF-8 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: Lennart Sorensen Cc: Paul Brook , qemu-devel@nongnu.org Lennart Sorensen wrote: > I just tried running with '-serial /dev/null -parallel /dev/null' and > the slow down problem disappeared. I am suspicious of this part of the > 6336 commit: > > @@ -1360,12 +1352,137 @@ void qemu_console_copy(QEMUConsole *console, int src_x, int src_y, > int dst_x, int dst_y, int w, int h) > { > if (active_console == console) { > - if (console->ds->dpy_copy) > - console->ds->dpy_copy(console->ds, > - src_x, src_y, dst_x, dst_y, w, h); > - else { > - /* TODO */ > - console->ds->dpy_update(console->ds, dst_x, dst_y, w, h); > - } > + dpy_copy(console->ds, src_x, src_y, dst_x, dst_y, w, h); > } > } > > To me this looks like what used to do a copy if the console was active, > and an update if it was not, has turned into a copy at all times. This > sounds like potentially doing expensive work on inactive consoles. This > is what made me think of trying to disable the parallel and serial > consoles. > > I made this little patch for console.c: > > --- qemu-0.9.1.14778c2064166a8d1d07b22f0af9eee4fa490e60/console.c 2009-01-21 09:26:06.000000000 -0500 > +++ qemu-0.9.1.14778c2064166a8d1d07b22f0af9eee4fa490e60.new/console.c 2009-01-21 10:12:29.000000000 -0500 > @@ -1433,7 +1433,11 @@ > int dst_x, int dst_y, int w, int h) > { > if (is_graphic_console()) { > - dpy_copy(ds, src_x, src_y, dst_x, dst_y, w, h); > + if(active_console->ds == ds) { > + dpy_copy(ds, src_x, src_y, dst_x, dst_y, w, h); > + } else { > + dpy_update(ds, dst_x, dst_y, w, h); > + } > } > } > > And then it is back to proper speed for me across ssh. Does it make sense? > I am afraid your patch shouldn't make a difference because sdl doesn't have a dpy_copy function so with sdl dpy_update is always called. Besides none calls qemu_console_copy but graphic cards so passing '-serial /dev/null -parallel /dev/null' shouldn't change anything in this regard. In any case I tried passing '-serial /dev/null -parallel /dev/null' as arguments but (locally) I do not see any benefits (I tested with the debian ppc installation cd). Could you please tell me if you see the slowdown on a local X server also? The sdl blitting functions are optimized to be run locally, it is possible that they do not have good performances on a remote X server. Fortunately we provide a much better interface to connect to qemu remotely (vnc), that now should be even faster than before.