[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Std VGA Performance


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
  • From: "Robert Phillips" <rsp.vi.xen@xxxxxxxxx>
  • Date: Thu, 25 Oct 2007 11:28:37 -0400
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Oct 2007 08:29:25 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=HYcfC3ubiXMrScD1Vcbf+a/jHQ4UPUT5Suyx1M6Ypom1bSA45HIvWwdpvVSqPBZhy17+1clJRko8m5V6vh7P0rv+riX0Gjc8Lc+u4Y69GxKCDPorr1QpPTAtUqlNYvg9kDE0Wvdjif0+qjnD2ZWSl1BLoGSHEZ6NEJPymEUIFTA=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Good questions, Keir.  Answers below:

On 10/25/07, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote:
On 24/10/07 22:36, "Ben Guthro" <bguthro@xxxxxxxxxxxxxxx > wrote:

> This patch improves the performance of Standard VGA,
> the mode used during Windows boot and by the Linux
> splash screen.
>
> It does so by buffering all the stdvga programmed output ops
> and memory mapped ops (both reads and writes) that are sent to QEMU.

How much benefit comes from immediate servicing of PIO input ops versus the
massive increase in buffered-io slots? Removing the former optimisation
would certainly make the patch a lot smaller!

Subjectively, the performance improvement appears substantial.  We have tested the code with the stdvga emulation and with and without the increased number of slots. With more slots the screen painting goes from being fast to very fast.

As you've noticed, the increase in number of slots is compensated by the decrease in slot size (so there is no increase in memory use) at the cost of packing (and unpacking) ioreqs as they are written to (and read from) the buffer.


What happens across save/restore? The hypervisor's state cache will go away,
won't it? I suppose it's okay if the guest is in SVGA LFB mode at that point
(actually, that's another thing - do you correctly handle hand-off between
VGA and SVGA modes), but I don't know that we want to rely on that.

This hasn't been a problem in practice.  The guest quickly switches from
VGA to SVGA mode causing the stdvga code to be largely inactive,
and we have only seen it switch back when the guest blue-screens.
The stdvga code detects that transition correctly and paints the blue-screen quickly.

After a restore, the code assumes it is not in standard VGA mode so is largely inactive. 
That conservative assumption might not be optimal but it is correct.

I don't believe the failure to save/restore the stdvga cache will prove problematic but
if it becomes so I will add corrective code.

One might ask (and we did) what is the point of all this VGA emulation code when it is only
active during the boot process (or during blue-screen painting).

The answer is that one wants the user's first experience with Xen to be positive;
as watching an excruciatingly slow Windows boot screen or Linux splash panel is not.
 
-- rsp

-- Keir

> We maintain locally essential VGA state so we can respond
> immediately to input and read ops without waiting for
> QEMU.  We snoop output and write ops to keep our state
> up-to-date.
>
> PIO input ops are satisfied from cached state without
> bothering QEMU.
>
> PIO output and mmio ops are passed through to QEMU, including
> mmio read ops.  This is necessary because mmio reads
> can have side effects.
>
> I have changed the format of the buffered_iopage.
> It used to contain 80 elements of type ioreq_t (48 bytes each).
> Now it contains 672 elements of type buf_ioreq_t (6 bytes each).
> Being able to pipeline 8 times as many ops improves
> VGA performance by a factor of 8.
>
> I changed hvm_buffered_io_intercept to use the same
> registration and callback mechanism as hvm_portio_intercept
> rather than the hacky hardcoding it used before.
>
> In platform.c , I fixed send_timeoffset_req() to sets its
> ioreq size to 8 (rather than 4), and its count to 1 (which
> was missing).



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel



--
--------------------------------------------------------------------
Robert S. Phillips                          Virtual Iron Software
rphillips@xxxxxxxxxxxxxxx                Tower 1, Floor 2
978-849-1220                                 900 Chelmsford Street
                                                    Lowell, MA 01851
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.