[Intel-gfx] FireFox performance regressions XAA -> EXA -> UXA

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 26 11:02:22 CET 2010

On Tue, 26 Jan 2010 04:38:05 -0500, Clemens Eisserer <linuxhippy at gmail.com> wrote:
> Hi Chris,
> Thanks for taking the time.
> @Chris: With XAA, is rendering really done client-side by firefox?
> I thought with XAA, xorg simply calls pixman for almost everything,
> but its still server-side?

I may be completely wrong, of course. ;-) Unless the server supports
RENDER, Cairo will create image surfaces and perform the rendering locally,
and then PutImage the result. I presume that firefox follows cairo's
strategy, or else Cairo will make a lot of GetImage/PutImage requests to
work-around the lack of functionality on the server. XAA was designed to
handle the core drawing protocols, EXA was introduced to handle the new
RENDER protocol.

> What I wonder is why the old EXA version does so much better.
> During many regressed tests I see quite some time spent in
> kernel-code, does GEM add so much overhead?

Yes, and we have become more and more paranoid about controlling
cache-coherency, for which we have to pay a high price in return for not
hanging the GPU so often (and being able to share buffers between multiple
applications). The extra cost in GEM is that we need to relocate our
buffers. Prior to use a kernel memory manager, each userspace driver knew
precisely where it's buffers where in the aperture and so could issue
commands that directly referenced addresses. After moving to a unified,
in-kernel GEM, we are now able to share the aperture and even memory
between applications at the cost that no user-space application knows
where any of the buffers are and so must ask the kernel to perform
relocations on its command stream.

> Wasn't GEM introduced to make everything faster?

Actually, GEM was introduced to make our lives easier. ;-)
However, our lives are spent making things work, and given a following
wind, faster.

> For 2D I see heavy
> regressions, and OpenGL games still perform a lot worse compared to
> Intel's windows drivers. (I can play tuxracer with everything set to
> high on windows, on Linux I have to reduce resolution and visibile to
> make it playable).

Sadly, yes. We use the Window's drivers as a goal for our own performance.
> > However, those results are quite sobering and hopefully we will be able to
> > use them to gain some meaningful insight into the vexed question of why
> > firefox does indeed feel so slow. Now all I have to track down this
> > mysterious script and reproduce those numbers...
> Carl has the script uploaded here: http://cworth.org/trender_bookmark/
> I have no idea how accurate the measurements are (however it repaints
> long enough to compensate for missing flushing), but the orders of
> magnitues at least show a "tendency".

Agreed, thanks for the script.

> - Clemens
> PS: And the worst: Firefox on Windows-XP feels faster on all of those
> benchmarks. Scrolling my GMail-Inbox was no problem at all, even on
> way slower machines.

Don't I know it, and people say cairo is slow. ;-)
[On Windows, not only is firefox in general faster (thanks to more effort
spent on tuning for that platform), but almost all rendering is performed
using cairo/pixman with only the occasional blit being handed off to GDI.
Mozilla are working on a D2D backend for cairo, which will be interesting.]

Chris Wilson, Intel Open Source Technology Centre

More information about the Intel-gfx mailing list