[PATCH xserver 0/4] Performance tuning for small ops

Adam Jackson ajax at redhat.com
Fri Apr 29 18:22:50 UTC 2016


tl;dr:

      before                  after   Operation
------------   --------------------   -------------------------
   1923358.8      2253822.2 (1.172)   Copy 10x10 from window to window 
   1650543.1      1968869.9 (1.193)   PutImage 10x10 square 
   1713902.4      2250849.1 (1.313)   ShmPutImage 10x10 square 
  17729644.8     32532331.1 (1.835)   X protocol NoOperation 

Granted that's n=1, but it's fairly representative across various runs I've
done while working on this series. I'm happy to provide ministat output
from more runs if it'd be more convincing.

Most of that win is patch 1/4, which is also the one I'm least sure of,
because I'm not at all confident I understand the control flow for grab
processing. Most extensions that make reference to time already do an
UpdateCurrentTimeIf() as appropriate, and I've tried to places where we
make reference to currentTime and push a UCTI near them, but I may have
missed a spot. Additional eyes greatly appreciated.

In 2/4 I'm not sure it's worth pushing the extension dispatch hook down
into the extensions. It'd be more code (source and binary both), and
eliminating the branch from the dispatch loop doesn't seem to affect
noop performance appreciably (at least, not on my Ivybridge). Honestly
it seems like it's mostly used to do blanket denial of particular
extensions, and that seems lazy to me, so the next step should really be
fixing the security extensions to be aware of everything we do.

The rest is just working around C being not that great of a language.

- ajax



More information about the xorg-devel mailing list