[PATCH] fix some performance gaps in Xace
Arjan van de Ven
arjan at infradead.org
Mon Nov 5 11:08:07 PST 2007
On Mon, 05 Nov 2007 11:22:29 -0500
Eamon Walsh <ewalsh at tycho.nsa.gov> wrote:
> Arjan van de Ven wrote:
> >>From 50d6941ab3af3297212fbcc20231bcaf0c8c6463 Mon Sep 17 00:00:00
> >>2001
> > From: root <root at benny.jf.intel.com>
> > Date: Tue, 30 Oct 2007 23:43:24 +0100
> > Subject: [PATCH] fix some performance gaps in Xace
> >
> > The XaceHook function is used in several hotpaths.
> > The problem with it (performance wise) is twofold:
> > * The XaceHook function has a big switch() statement for the hook
> > number in it
> > * The XaceHook function uses varargs to reassemble the final
> > dispatch arguments again
> >
> > Both are expensive operations... for something that is known at
> > compile time
> >
> > This patch turns the hotpath XaceHook call into a direct call to
> > avoid the switch and varargs; this gives me over 10% performance
> > gain on the x11perf benchmark.
>
> Thanks for the patch. Could I get a copy of your numbers, I have
> some x11perf results from some point that don't show this big of a
> hit.
>
sure; first set of numbers is for with the optimized patch, second set
of numbers is without the patch
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 10400001 on :0.0
from xxxx.intel.com
Sat Nov 3 23:22:55 2007
Sync time adjustment is 0.0522 msecs.
90000000 reps @ 0.0002 msec (5700000.0/sec): X protocol NoOperation
90000000 reps @ 0.0002 msec (5700000.0/sec): X protocol NoOperation
90000000 reps @ 0.0002 msec (5700000.0/sec): X protocol NoOperation
90000000 reps @ 0.0002 msec (5700000.0/sec): X protocol NoOperation
90000000 reps @ 0.0002 msec (5700000.0/sec): X protocol NoOperation
450000000 trep @ 0.0002 msec (5700000.0/sec): X protocol NoOperation
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 10400001 on :0.0
from xxxx.intel.com
Sat Nov 3 23:19:32 2007
Sync time adjustment is 0.0522 msecs.
80000000 reps @ 0.0002 msec (5200000.0/sec): X protocol NoOperation
80000000 reps @ 0.0002 msec (5210000.0/sec): X protocol NoOperation
80000000 reps @ 0.0002 msec (5210000.0/sec): X protocol NoOperation
80000000 reps @ 0.0002 msec (5210000.0/sec): X protocol NoOperation
80000000 reps @ 0.0002 msec (5210000.0/sec): X protocol NoOperation
400000000 trep @ 0.0002 msec (5210000.0/sec): X protocol NoOperation
More information about the xorg
mailing list