From: Markus Armbruster Subject: Re: [RFC] PVFB: Add refresh period to XenStore parameters? Date: Tue, 04 Mar 2008 18:06:26 +0100 Message-ID: <87tzjm5sh9.fsf@pike.pond.sub.org> References: <20080229120806.GA8268@implementation.uk.xensource.com> <873ar7ptvh.fsf@pike.pond.sub.org> <20080303191804.GA11699@implementation.uk.xensource.com> <873ar68spy.fsf@pike.pond.sub.org> <20080304144952.GA9230@implementation.uk.xensource.com> <873ar67anv.fsf@pike.pond.sub.org> <20080304161220.GA9852@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20080304161220.GA9852@implementation.uk.xensource.com> (Samuel Thibault's message of "Tue\, 4 Mar 2008 16\:12\:20 +0000") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Samuel Thibault writes: > Markus Armbruster, le Tue 04 Mar 2008 16:48:20 +0100, a =C3=A9crit : >> Samuel Thibault writes: >> > Markus Armbruster, le Tue 04 Mar 2008 15:32:57 +0100, a =C3=A9crit : >> >> > In my case, I'm using PVFB to expose the stubdomain qemu display. = The >> >> > problem is that every 30ms, qemu wakes up to memcmp() the whole vid= eo >> >> > memory with a shadow buffer so as to track changes. If it knew tha= t the >> >>=20 >> >> Wait a second! You're talking about *your* frontend here, aren't you? >> >>=20 >> >> Maintaining a shadow copy in the frontend (which requires compare and >> >> copy) to minimize copying in the backend sounds pretty self-defeating >> >> to me. Why is this a good idea? >> > >> > Because in my case the domain is HVM, and I don't want to trap the >> > writes to the video RAM since that's awfully slow. >> > >> >> Why not refrain from sending update messages and have the backend >> >> simply redisplay everything? >> > >> > Because as explained above, I can't avoid a shadow copy. >>=20 >> I imagine (perhaps naively): >>=20 >> * The domU writes to a framebuffer provided by the frontend. >> >> * The framebuffer (not a copy of it) can be shared with the backend, >> which only reads. > > Well, that's not always the case, when the guest is in text mode for > instance, the PV shared buffer is converted from the guest text buffer. Optimize for the common case. Which I figure is a 32 bpp framebuffer. Anyway, compare and copy for some legacy 80x25 text mode shouldn't eat that much CPU. >> * If the frontend can track changes efficiently, it sends update >> messages to the backend, which can use them to only redisplay >> changed areas. >>=20 >> Else the backend needs to assume the worst and periodically >> redisplay everything. It is free to maintain a shadow copy to track >> changes and minimize redisplay, if that turns out to be faster. >>=20 >> What's wrong with that? > > Well, that was actually my next target :) > (but for that we badly need the resize/redepth support). We'll see another iteration of the patch soon, I hope. > However, that doesn't solve something that still bugs me, which is > that the VGA emulation layer wakes up every 30ms to just notice that > the width/height/depth registers didn't change etc. even if the actual > window is not shown. > > Samuel