From: Markus Armbruster <armbru@redhat.com>
To: Samuel Thibault <samuel.thibault@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [RFC] PVFB: Add refresh period to XenStore parameters?
Date: Tue, 04 Mar 2008 15:32:57 +0100 [thread overview]
Message-ID: <873ar68spy.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <20080303191804.GA11699@implementation.uk.xensource.com> (Samuel Thibault's message of "Mon\, 3 Mar 2008 19\:18\:04 +0000")
Samuel Thibault <samuel.thibault@eu.citrix.com> writes:
> Hello,
>
> Markus Armbruster, le Mon 03 Mar 2008 19:03:46 +0100, a écrit :
>> Samuel Thibault <samuel.thibault@eu.citrix.com> writes:
>> > Sometimes the backend of PVFB knows that it doesn't need permanent
>> > refresh, when the window is minimized for instance (no refresh at all),
>> > or the administration tools know that the window is thumnailed, and so a
>> > slow refresh rate is fine. Also, some users may want to tune the
>> > refresh rate according to the smoothness they would like, balanced with
>> > the CPU time that requires.
I'm not sure I understand how this is supposed to work. Commonly, my
display is somewhere else, and all the backend knows of it is a VNC
connection. It has no idea what I do with my VNC viewer window. Can
you explain?
>> Can you quantify the CPU time savings?
>
> Something like 6% CPU on my test machine (by just slowing down from 30ms
> to 1000ms interval).
>
> 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 video
> memory with a shadow buffer so as to track changes. If it knew that the
Wait a second! You're talking about *your* frontend here, aren't you?
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?
Why not refrain from sending update messages and have the backend
simply redisplay everything? tools/ioemu/hw/xenfb.c doesn't implement
that mode, but it shouldn't be hard. And then you could control the
refresh rate solely in the backend, without having to communicate with
the frontend.
> window is minimized or reduced, it could stop or increase that polling
> interval. With SDL and vnc, it can, but when going through PVFB that
> information is lost.
>
>> Are you sure they're worth the extra complexity?
>
> At least watching a simple integer in XenStore is not very complex.
>
> Note that this may not be a requirement, just the backend telling the
> frontend what he'd prefer to see. If it's difficult for the frontend to
> change the rate, then it can just ignore it, and the user won't be so
> happy, that's all.
I'm concerned that we're papering over performance problems instead of
solving them.
>> Are you sure the ability to control the rate is required? Why isn't
>> it sufficient to be able to switch updates off?
>
> Being able to choose the smoothness of the interface is really a good
> user experience. To my feeling, the current 30ms default rate of qemu
> (7% CPU) is not so smooth (people don't use 30Hz monitors, to they? ;).
> I usually prefer spending e.g. 14% CPU to get a 10ms rate, but of course
> I don't want that CPU time to be used when the viewer is off screen.
> Other people won't feel that need and can save CPU% by slowing it down.
>
> Also, in other cases, you just need to have a snapshot of the VMs, so a
> 1s rate (or even 10s) makes sense.
>
>> Another option is to send a suitable message through the ring.
>
> Yes, but then it's hard for management tools (e.g. a gui that manages
> VMs) to tune it, while a xenstore value is pretty easy to tinker with.
Depends on who does the tinkering. If its the backend, then nothing
is easier than sending a message through the ring.
On the other hand, if this is just a hack to make a particular
frontend less inefficient, then using XenStore at least keeps it out
of the PVFB protocol.
>> The pvops PVFB uses fb_defio. I think we can change the refresh
>> period there by changing xenfb_defio.delay, but that doesn't exactly
>> look like something the API wants us to do.
>
> Then that frontend may just ignore the rate. It's much less of a
> concern, since that frontend doesn't use an active polling loop, and
> thus consumes no CPU if nothing happens in the guest.
>
> Samuel
next prev parent reply other threads:[~2008-03-04 14:32 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 12:08 [RFC] PVFB: Add refresh period to XenStore parameters? Samuel Thibault
2008-03-03 11:07 ` Samuel Thibault
2008-03-03 18:03 ` Markus Armbruster
2008-03-03 19:18 ` Samuel Thibault
2008-03-04 12:36 ` Trolle Selander
2008-03-04 14:32 ` Markus Armbruster [this message]
2008-03-04 14:49 ` Samuel Thibault
2008-03-04 15:11 ` Samuel Thibault
2008-03-04 15:48 ` Markus Armbruster
2008-03-04 16:12 ` Samuel Thibault
2008-03-04 17:06 ` Markus Armbruster
2008-03-04 17:19 ` Samuel Thibault
2008-03-05 8:03 ` Markus Armbruster
2008-03-05 9:59 ` Samuel Thibault
2008-05-01 17:55 ` Samuel Thibault
2008-05-02 16:06 ` Samuel Thibault
2008-05-05 8:26 ` Markus Armbruster
2008-05-05 9:18 ` Samuel Thibault
2008-05-05 9:58 ` Markus Armbruster
2008-05-05 10:21 ` Samuel Thibault
2008-05-05 16:50 ` Samuel Thibault
2008-05-06 13:50 ` Markus Armbruster
2008-05-06 14:07 ` Keir Fraser
2008-05-06 16:32 ` Samuel Thibault
2008-05-06 16:50 ` Markus Armbruster
2008-05-06 17:29 ` Samuel Thibault
2008-05-07 14:43 ` Markus Armbruster
2008-05-07 14:54 ` Samuel Thibault
2008-05-08 8:25 ` Markus Armbruster
2008-05-08 15:01 ` Samuel Thibault
2008-05-09 8:43 ` Markus Armbruster
2008-05-09 10:31 ` Samuel Thibault
2008-05-09 10:48 ` Markus Armbruster
2008-05-09 13:43 ` Samuel Thibault
2008-03-05 11:19 ` Markus Armbruster
2008-03-05 11:27 ` Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873ar68spy.fsf@pike.pond.sub.org \
--to=armbru@redhat.com \
--cc=samuel.thibault@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.