Bug 24981 - commit 'i965: Fix BRW_WM_MAX_INSN to reflect current limits.' causes performance regressions
Summary: commit 'i965: Fix BRW_WM_MAX_INSN to reflect current limits.' causes performa...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: high major
Assignee: Eric Anholt
QA Contact:
Keywords: regression
Depends on:
Reported: 2009-11-07 11:59 UTC by maximlevitsky
Modified: 2009-11-10 16:06 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description maximlevitsky 2009-11-07 11:59:07 UTC
I bisected this commit.

2c30ee9bd69ed606b984c051748a7cdb34905eeb is first bad commit
commit 2c30ee9bd69ed606b984c051748a7cdb34905eeb
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Oct 30 13:20:13 2009 -0700

    i965: Fix BRW_WM_MAX_INSN to reflect current limits.
    Part of fixing bug #24355.

To reproduce, just start the sauerbraten game.
I play now the version in ubuntu 9.10 (0.0.20090504.dfsg-1)

I tested the 'Private stan sauer', part 2 (run and guns ||)
Here attached version of configuration I used.

With this regression, I see frequent hick-ups, that make the game almost

Without the regression I get about 18-24 FPS.

I bisected this bug (and tested successfully master branch with this
commit reverted)
Comment 1 Gordon Jin 2009-11-08 17:31:51 UTC
(moving to mesa category)

This seems similar to bug#24847
Comment 2 Eric Anholt 2009-11-10 16:06:34 UTC
Thanks for the bisect -- I had a hard time believing it caused a regression, but sure enough:

commit c5413839b3e99c7b162f1260142f3c175502b0ce
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Nov 10 15:51:29 2009 -0800

    i965: avoid memsetting all the BRW_WM_MAX_INSN arrays for every compile.
    For an app that's blowing out the state cache, like sauerbraten, the
    memset of the giant arrays ended up taking 11% of the CPU even when only a
    "few" of the entries got used.  With this, the WM program compile drops back
    down to 1% of CPU time.
    Bug #24981 (bisected to BRW_WM_MAX_INSN increase).

Of course, the real problem here is that sauer's blowing out the state cache.

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.