PolyRectFill preformance

Ross Vandegrift ross at kallisti.us
Sun Mar 16 12:40:41 PDT 2008

Hi everyone,

I've run across a few webpages that trigger Xorg to burn CPU like
there's no tomorrow.  I've started doing some profiling and
comparisons of various scenarios and digging through the source, but
I'm kinda new to the guts of X.

I've been testing on Nvidia G71 and G72M chips with both nv and
nouveau.  XAA vs. EXA makes little difference, which makes me think
this issue might be related to the mixing of accel and non-accel'ed
operation.  This is corroborated by enabling NoAccel - performance is
many orders of magnitude better (but of course sucks for other stuff).
oprofile indicates that fbBlt is where most CPU is burned.

Goggling around, I've found Carl Worth's copious notes on glyph
rendering and pixmap performance.  After reading his awesome
descriptions, I don't think glyph compositing is the issue - his
microbenchmark (x11perf -aa10text) posts over 400kglyphs/s even with
EXA, which is worst-case on my cards.  And while CPU is 100% during
that test, I see a very different callgraph.

According to my profiling, these web pages are causing lots of calls to
*PolyRectFill.  In both EXA and XAA versions, it looks like the
non-accel fallbacks end up in fbBlt.  These calls are from Mozilla's

I'm hoping to find a simpler test case with x11perf.  I'm currently trying
to go through x11perf tests to see if I can find a test that'll hit
this, but so far no dice (the vast majority of CPU time is being spent
in nv_drv.so, which makes me think I haven't found the software
fallback yet).

Any tips on tracking this down?

Ross Vandegrift
ross at kallisti.us

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37

More information about the xorg mailing list