From: Alexander Graf Subject: Re: [PATCH] kvm tools, ui: Optimize SDL updates Date: Sat, 4 Jun 2011 13:59:27 +0200 Message-ID: <952BD709-CDEC-49F8-875F-F15DCE1D2E75@suse.de> References: <1307136023-16693-1-git-send-email-penberg@kernel.org> <20110604095451.GA15349@elte.hu> <11EB6DEC-41E9-4C0A-A057-7E88EBA2A008@suse.de> <20110604104245.GF16292@elte.hu> <34B8A15A-AEF2-4E2D-99F5-0EDB41447C31@suse.de> <20110604105443.GH16292@elte.hu> <20110604115353.GA30593@elte.hu> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: Pekka Enberg , KVM list , Cyrill Gorcunov , John Floren , Sasha Levin , Gerd Hoffmann To: Ingo Molnar Return-path: Received: from cantor.suse.de ([195.135.220.2]:37186 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753886Ab1FDL7a convert rfc822-to-8bit (ORCPT ); Sat, 4 Jun 2011 07:59:30 -0400 In-Reply-To: <20110604115353.GA30593@elte.hu> Sender: kvm-owner@vger.kernel.org List-ID: On 04.06.2011, at 13:53, Ingo Molnar wrote: > > * Alexander Graf wrote: > >> Why would you need panning/scrolling for a fast FB? It's really an >> optimization that helps a lot with VNC, but on local machines or >> SDL you shouldn't see a major difference. > > Qemu's fb console scrolling graphics is pretty slow to me even > locally so i assume that the dirty bitmap trick is not enough. > > VirtualBox graphics is very fast, but it probably has its own console > abstraction and scrolling/2D/3D acceleration. > > Also, since tools/kvm/ is really also about learning interesting > stuff, smooth scrolling was the historic first 'acceleration' usecase > that video graphics cards added - before they evolved more complex 2D > acceleration and then started doing 3D. > > Walking that path would allow us to do a gradual approach, while > still having relevant functionality and enhancements at every step. Sure, not saying scrolling is a bad thing to implement. I was merely trying to point out that the slowness you were seeing was not related to scrolling :). >> Unless you use the FB as MMIO. Qemu just maps the FB as RAM and >> checks for dirty bitmap updates periodically. That way you don't >> constantly exit due to MMIO and are good on speed. The slowness you >> describe sounds a lot as if you don't do that trick. > > Correct, and i assumed we already do the dirty-bitmap trick: > > KVM_MEM_LOG_DIRTY_PAGES > KVM_GET_DIRTY_LOG > > But you are right, we do not actually do that! > > Pekka, i think this should be the next step. We'll need scrolling > after that ... Yup. If you want to do graphics, dirty bitmaps are the way to go. Please be aware that the dirty bitmap is always little endian :). > In theory it would also be nice to tunnel the VGA text frame buffer > over to the KVM tool - as serial console is not supported by most > installers and default distro images. We could actually do a rather > good job of emulating it via Slang/Curses. Yep, works pretty well in Qemu. $ qemu -curses ... gives you the VGA text frame buffer through curses. Just in case you need some inspiration :) Alex