From: Markus Armbruster Subject: Re: [RFC] PVFB: Add refresh period to XenStore parameters? Date: Mon, 05 May 2008 11:58:53 +0200 Message-ID: <87ej8hysv6.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> <20080501175536.GV4797@implementation.uk.xensource.com> <20080502160638.GG4819@implementation.uk.xensource.com> <877ie917ix.fsf@pike.pond.sub.org> <20080505091808.GC4497@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: <20080505091808.GC4497@implementation.uk.xensource.com> (Samuel Thibault's message of "Mon\, 5 May 2008 10\:18\:09 +0100") 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 Mon 05 May 2008 10:26:14 +0200, a =C3=A9crit : >> Any particular reason for going through xenstore instead of the event >> rings? > > Just because it exists. Sufficient reason for climbing mountains, if you're so inclined, but is it sane guidance for software development? So far, PVFB uses xenstore *only* for device initialization and shutdown. For normal operations, we communicate through the event rings. Therefore, there's just one place dealing with events related to device initialization and shutdown (in the fb frontend: xenfb_backend_changed()), and just one place dealing with all other events (fb frontend: xenfb_event_handler()). I fear mixing in more communication channels without a technical need just adds complexity for no real gain. >> If I read your patch correctly, xenfb_read_frontend_fb_config() sets >> request-update in xenstore depending on xenfb->ds->idle, during >> startup. The only place that changes it is xenfb_update(), which is >> #ifdef CONFIG_STUBDOM. > > Err, no, it is not #ifdef CONFIG_STUBDOM. Oops, you're right. You'll have to update its comment, by the way. >> What if ds->idle is true when xenfb_read_frontend_fb_config() runs >> during startup of the ordinary (!CONFIG_STUBDOM) backend? Can this >> happen? > > Yes it can, when running a vnc server for instance. And when later on a > client connects, on next iteration of xenfb_update() the frontend will > be notified. > >> Other than that, the change seems to affect only Mini-OS and >> CONFIG_STUBDOM, which are both outside the area of my expertise (and >> frankly, interest). > > Well, that could be used in the linux frontend to disable the timer too. > That may interest e.g. laptop users. > > Samuel The frontend should not send any events unless something's drawing on the display. And when something's drawing on the display, the guest, and therefore the laptop, is already burning processor cycles, and whether disabling sending updates saves any battery power is not obvious. Of course, if you can demonstrate it does... Anyway, I'm not opposed to the feature.