Bug 87438 - [IVB/BDW Bisected] Firefox-fishbowl.trace and Firefox-fishtank.trace performance reduced ~96%
Summary: [IVB/BDW Bisected] Firefox-fishbowl.trace and Firefox-fishtank.trace performa...
Alias: None
Product: cairo
Classification: Unclassified
Component: xlib backend (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
Depends on:
Reported: 2014-12-18 11:53 UTC by wendy.wang
Modified: 2018-08-25 13:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

dmesg file (124.55 KB, text/plain)
2014-12-18 11:53 UTC, wendy.wang
Xorg log (15.34 KB, text/plain)
2014-12-18 11:53 UTC, wendy.wang

Description wendy.wang 2014-12-18 11:53:02 UTC
Created attachment 110981 [details]
dmesg file

Test Platform:IVB/BDW

GFX SW Stack
Libdrm:                         (master)libdrm-2.4.58-19-gf99522e678dbbaffeca9462a8edcbe900574dc12
Mesa:                           (master)83e8bb5b1a50c0105b642d559999f07fa64a982f
Xserver:                       (master)xorg-server-
Xf86_video_intel:                        (master)2.99.916-177-g99537089346ed7a1bc6b02349fad93845e865bb9
Cairo:                            (master)4a225fca5f121c31ddaa0af80a13bf95a7f21a5b
Libva:                            (master)8986ec692b19d8dd6bd2aa118b5dffbd05a8f909
Libva_intel_driver:                      (master)b5d6d9d425a6d539b27d22992bda05f79d1a0622
Kernel:   (drm-intel-nightly)8b7ac3dc495c2d02322bc751322331d2691089e5


Bug detailed description:
Firefox-fishbowl.trace and Firefox-fishtank.trace performance reduced ~96%.
It's Cairo regression, from bisect result, first bad commit is:


Author: Bill Spitzak <spitzak@gmail.com>
Date:   Thu Oct 9 19:46:13 2014 -0700

    xlib: Use image fallback for GOOD/BEST filters

    Fallback is not used if the symbols defined in the previous patch to
    indicate if XRender does GOOD/BEST are true.

    This patch also includes some changes to take advantage of the fact that
    if there is an integer translation analyze_filter will already have set
    the filter to NEAREST.

    Reviewed-by: Bryce Harrington <b.harrington@samsung.com

Reproduce steps:
1,   xinit       
2,   vblank_mode=0 CAIRO_TEST_TARGET=xlib ./cairo-perf-trace -i 12 /home/cairo-traces/benchmark/firefox-fishbowl.trace

dmesg and xorg.log files have been uploaded.
Comment 1 wendy.wang 2014-12-18 11:53:43 UTC
Created attachment 110982 [details]
Xorg log
Comment 2 Bill Spitzak 2014-12-22 21:50:48 UTC
If the filter is left at the default of CAIRO_FILTER_GOOD this is to be expected. Changing the filter to CAIRO_FILTER_BILINEAR should restore the speed.

An actual fix will require adding code to pixman so that the filtering can be done in the X server. Otherwise making images into pixmaps in an attempt to speed things up actually make it slower as they just have to be read back into the client program to do the transform.

It may also be necessary to implement 2-pass filtering.
Comment 3 Bryce Harrington 2015-03-07 22:18:09 UTC
Has a bug been filed about this with Pixman?

If so, can we close this bug as wontfix, since the performance delta is a documented change for 1.14?

I also wonder if the test suite needs to be modified to use the faster scaling?
Comment 4 wendy.wang 2015-03-09 08:53:44 UTC
Submitted bug 89499 - [IVB/BDW Bisected] Pixmap need filter CAIRO_FILTER_GOOD and CAIRO_FILTER_BILINEAR
to track the actual fix solution.

And close this bug as will not fix.
Comment 5 Chris Wilson 2015-03-09 09:29:48 UTC
This bug is in the xlib backend not pixman.
Comment 6 Chris Wilson 2015-03-09 09:30:15 UTC
(Remember that even at best, pixman will be orders of magnitude slower than a GPU here.)
Comment 7 Bill Spitzak 2015-03-09 17:36:22 UTC
I would like to see some indication that code submitted to pixman will be merged or at least looked at. Currently a patch to move the filtering from Cairo to Pixman has been outstanding on the mailing list for 4 months with no feedback. If this was merged I would like to try working on a true 2-pass algorithm which can only be done in Pixman, not in Cairo.

I got feedback for an earlier version of the patch. I believe I addressed the problems listed in the feedback, but even if not new feedback would be appreciated.

Patch is in Pixman mailing list, message id <1419385932-13261-1-git-send-email-spitzak@gmail.com>
Comment 8 GitLab Migration User 2018-08-25 13:39:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/117.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.