radeon EXA performance questions

Owen Taylor otaylor at redhat.com
Tue Aug 5 07:17:32 PDT 2008

On Mon, 2008-08-04 at 21:40 +0200, Simon Thum wrote:
> Owen Taylor wrote:
> > That CPU time is spent here doesn't necessarily mean that this the
> > actual bottleneck... GetImage needs to wait for the GPU to become
> > idle, and that involves a busy-wait currently. (At least with the DRM,
> > and probably otherwise.)
> That makes sense given the XAA code doesn't make much use of locks.

Not completely sure what you mean by locks. Typically "good performance"
with XAA mean that you've set XaaNoOffscreenPixmaps, and are using pure
software rendering; pure software rendering is much faster than badly
accelerated rendering.

> > When I've seen GetImage taking most of the CPU, that's typically meant
> > that drawing in general is GPU bound, so the CPU gets ahead of the
> > GPU and blocks in GetImage. 
> Just out of curiosity: Is the FB (b)locked as whole?

The server is single threaded, so while the server is waiting for the
GPU to go idle:

 - No other drawing requests will be processed
 - The X client that called GetImage will block in that call
 - Any other X clients that make synchronous calls to the X server 
   will block

Extensive use of GetImage will thus reduce parallelism between the CPU
and the GPU.

> > I can't find the actual profile in the list archives, so I'm not sure if
> It was a bit too big.
> > the CPU time is waiting for the GPU to go idle, or it's actually
> > spent in the copying itself, which would indicate a different sort of
> > problem ... perhaps cairo is using extensive software fallbacks for some
> > reason.
> I used Thunderbird 1.5/FF2, which AFAIK rules out cairo. Michel 
> suggested the missing DRI to be the problem. If there is interest in the 
> profile or a profile of special cases can do them.

If this is with Thunderbird 1.5/FF2, then my comments about GetImage
being used to draw native widgets don't apply.... that's a Gecko 1.9/FF3
thing. So, I'm not sure what is calling GetImage. If you really wanted
to investigate, you could make sure that you have debug symbols
installed, ssh into the computer doing the rendering, attach to
Thunderbird in a debugger, then insert a breakpoint in GetImage, and see
if it gets called, and what the backtrace is.

But in general, I would suggest that useful performance profiles are
profiles of the code that the developers work on, and that users are
using now, or will be shortly, so that means:

 - Firefox 3
 - DRI enabled (graphics commands submitted through the kernel)
 - Recent X server and video driver

And as Michel said, the more you can narrow a profile down to a single
operation the better it is.

- Owen

More information about the xorg mailing list