From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Richter <richter@rus.uni-stuttgart.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: Performance drop on XDrawRectangles()
Date: Wed, 8 Jan 2014 17:18:51 +0100 [thread overview]
Message-ID: <20140108161851.GU4770@phenom.ffwll.local> (raw)
In-Reply-To: <52CD7580.8040106@rus.uni-stuttgart.de>
On Wed, Jan 08, 2014 at 04:57:52PM +0100, Thomas Richter wrote:
> Hi folks,
>
> during the changes from 3.12rc7 to 3.13rc4, the performance of
> XDrawRectangles() dropped considerably. Interestingly, it is not the
> raw rectangles drawing operations that are slow, but it seems that
> the "per-call" overhead has increased by one magnitude. In specific,
> if you use the unmodified "x11pref" program:
>
> x11pref -rect10
>
> no substiantial changes are visible. However, if the rectangles are
> drawn one by one by changing:
>
> /* snip: old version, lines 86ff of do_rects.c of the x11perf program */
>
> void
> DoRectangles(XParms xp, Parms p, int reps)
> {
> int i;
>
> for (i = 0; i != reps; i++) {
> XFillRectangles(xp->d, xp->w, pgc, rects, p->objects);
> if (pgc == xp->bggc)
> pgc = xp->fggc;
> else
> pgc = xp->bggc;
> CheckAbort ();
> }
> }
>
> /* to the following : */
>
> void
> DoRectangles(XParms xp, Parms p, int reps)
> {
> int i;
> int j;
>
> for (i = 0; i != reps; i++) {
> for(j = 0;j < p->objects;j++) {
> XFillRectangles(xp->d, xp->w, pgc, rects+j, 1);
> }
> if (pgc == xp->bggc)
> pgc = xp->fggc;
> else
> pgc = xp->bggc;
> CheckAbort ();
> }
> }
>
> by instead drawing the rectangles one by one, the performance is
> decreased to one eigths of the original performance:
>
> 400000 trep @ 0.0687 msec ( 14600.0/sec): 10x10 rectangle (new)
> 2500000 trep @ 0.0107 msec ( 93900.0/sec): 10x10 rectangle (old)
>
> Thus, apparently, not the actual hardware acceleration degraded, but
> there is something in the call path that slowed down the call
> considerably.
>
> Any idea what changed?
If the ddx is indeed the same and Chris doesn't have any ideas I guess a
full bisect of the kernel should help a lot. Could very well be that some
seemingly unrelated change in e.g. the scheduler caused havoc ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-01-08 16:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 15:57 Performance drop on XDrawRectangles() Thomas Richter
2014-01-08 16:18 ` Daniel Vetter [this message]
2014-01-08 17:10 ` Chris Wilson
2014-01-08 17:49 ` Thomas Richter
2014-01-08 18:09 ` Chris Wilson
2014-01-08 22:08 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140108161851.GU4770@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=richter@rus.uni-stuttgart.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox