Bug 83482 - [BDW Bisected] "bdw: Apply workarounds in render ring init function" reduced performance 10%~40%
Summary: [BDW Bisected] "bdw: Apply workarounds in render ring init function" reduced ...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high critical
Assignee: Mika Kuoppala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-04 08:14 UTC by zhoujian
Modified: 2017-09-04 10:27 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
DEBUG: drm/i915: add i915.wa module parameter to control bdw workarounds (4.50 KB, patch)
2014-09-16 12:41 UTC, Jani Nikula
no flags Details | Splinter Review
v2: DEBUG: drm/i915: add i915.wa module parameter to control bdw workarounds (4.56 KB, text/plain)
2014-09-16 12:45 UTC, Jani Nikula
no flags Details
drm/i915/bdw: Cleanup pre prod workarounds (1.53 KB, patch)
2014-09-17 15:11 UTC, Mika Kuoppala
no flags Details | Splinter Review

Description zhoujian 2014-09-04 08:14:35 UTC
Platform:BDW
Libdrm:(master)libdrm-2.4.56-21-g8c2ae1695913990cbe6c6a8aa294f354eba33bd0
Mesa:(master)2adf7ee92e19ca978d6dac29fead59f14d033f3e
Xserver:(master)xorg-server-1.16.0-152-g3a51418b2db353519a1779cf3cebbcc9afba2520
Xf86_video_intel:(master)2.99.914-86-g48a33fc379b17eed195875222ad773c911d9dff1
Cairo:(master)8e11a42e3e9b679dce97ac45cd8b47322536a253
Libva:(master)c356638098e55453d2fac8bbb92eafc8cc32d6f4
Libva_intel_driver:(master)865f288d6821dfea5a9dc2a0525eba69ef786b23
Kernel:(drm-intel-nightly)2b1159961e4bc38a9090f8ec0ab6f16701dbdf81

Bug detailed description:
--------------------------------------------------
Doom3 v1.3.1/etqw-demo/Lightsmarkv2008/OpenArena v0.8.8/warsow v1.0/Xonotic v0.7/CS/Half life2/Team Fortress 2/Portal/GpuTest v0.5/Unigine-demos/GLBenchmarkv2.5.1/v2.7.0/Synmark2_v6(OglBatch4/OglBatch5/OglDeferred/OglDeferredAA/OglFillTexMulti/OglHdrBloom/OglPSBump2/OglPSBump8/OglPSPhong/OglPSPom/OglShMapPcf/OglShMapVsm/OglTexFilterTri/OglTexMem128/OglTexMem512/OglTexFilterAniso/) performance reduced 10%~40% on BDW,This issue doesn't exist on IVB/HSW/BYT-M.

It's kernel regression(drm-intel-next-queued),bisected the result show first bad commit is:e3fa2c1fe53005d12db525fd4d9b13c2de4e219c 
Author:     Arun Siluvery <arun.siluvery@linux.intel.com>
AuthorDate: Tue Aug 26 14:44:50 2014 +0100
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Fri Aug 29 10:56:03 2014 +0200
    drm/i915/bdw: Apply workarounds in render ring init function

BTW,this issue also exist on drm-intel-nightly kernel branch.

Reproduce step:
----------------------------------------------------
1. xinit&
2. ./synmark2 OglFillTexMulti
Comment 1 Chris Wilson 2014-09-05 10:19:33 UTC
So we are now enabling the gen8 w/a. It may be interesting to see which is responsible (or it may be more than one each contributing a little) - in particular, the GEN6_WIZ_HASHING_16x4 is an optimisation and not mandatory afaik.
Comment 2 Eero Tamminen 2014-09-10 11:39:55 UTC
When looking at the performance drop in test results between 27.8. -> 1.9. (which testers stated to be because of this bug), the largest drop is for OglPSPhong & OglFillTexMulti, their performance was earlier about 2.5x.

Interestingly, there was exactly same sized BDW perf improvement around 6.8. - 10.8, which is now gone.

Looking at all the affected tests, issue seems to be with pixel shader performance and GPU memory bandwidth.
Comment 3 Jani Nikula 2014-09-16 12:41:43 UTC
Created attachment 106369 [details] [review]
DEBUG: drm/i915: add i915.wa module parameter to control bdw workarounds

Here's a patch to add a i915.wa module parameter to control the workarounds to be applied. Please read the commit message for details.

Please apply this on top of drm-intel-nightly, confirm you still have the perf regression, and drop workarounds one by one (or in groups as necessary, but gets harder) to try to find out which specific workaround makes the difference.

Chris, do you have any further comments on this?
Comment 4 Jani Nikula 2014-09-16 12:45:14 UTC
Created attachment 106370 [details]
v2: DEBUG: drm/i915: add i915.wa module parameter to control bdw workarounds

Fixed version.
Comment 5 Chris Wilson 2014-09-16 20:05:06 UTC
We have also been discussing that the implementation of RPS on BDW is unreliable for benchmarking. It would also be sensible to fix the frequency whilst doing perf regression tests to rule out RPS fluctuations:

cat /sys/class/drm/card0/gt_max_freq_mhz  > /sys/class/drm/card0/gt_min_freq_mhz
Comment 6 zhoujian 2014-09-17 06:37:46 UTC
(In reply to comment #4)
> Created attachment 106370 [details]
> v2: DEBUG: drm/i915: add i915.wa module parameter to control bdw workarounds
> 
> Fixed version.
I have tried patch:attachment 106370 [details],this issue still exist.
Comment 7 Eero Tamminen 2014-09-17 06:48:28 UTC
(In reply to comment #5)
> We have also been discussing that the implementation of RPS on BDW is
> unreliable for benchmarking.

We're seeing same performance regression as PRC, it's 100% reproducible and I don't see any frequency fluctuation.


(In reply to comment #6)
> (In reply to comment #4)
> > Created attachment 106370 [details]
> > v2: DEBUG: drm/i915: add i915.wa module parameter to control bdw workarounds
> > 
> > Fixed version.
> I have tried patch:attachment 106370 [details],this issue still exist.

Which "i915.wa" parameter values you tested?

(If you aren't seeing any changes when you disable all of the workarounds with it, you've bisected wrong commit.)
Comment 8 Mika Kuoppala 2014-09-17 15:11:22 UTC
Created attachment 106436 [details] [review]
drm/i915/bdw: Cleanup pre prod workarounds
Comment 9 Mika Kuoppala 2014-09-17 15:14:36 UTC
Please test with https://bugs.freedesktop.org/attachment.cgi?id=106436
Comment 10 zhoujian 2014-09-19 06:52:20 UTC
(In reply to comment #9)
> Please test with https://bugs.freedesktop.org/attachment.cgi?id=106436
Using above patch:https://bugs.freedesktop.org/attachment.cgi?id=106436,it can woks well,please push patch to nightly,thanks.
Comment 11 Jani Nikula 2014-09-19 10:59:45 UTC
Mika, please post the patch to intel-gfx with bugzilla reference.
Comment 12 Mika Kuoppala 2014-09-24 09:12:15 UTC
In drm-intel-next-fixes:

commit d37cf5f7e1b315585940a735a8508d955ffc0f16
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri Sep 19 20:05:26 2014 +0300

    drm/i915/bdw: Cleanup pre prod workarounds
    
    as these have been fixed in production hw and hurt performance
    if applied.
    
    v2: adjust requested ring space (Ville)
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83482
    Tested-by: zhoujian <jianx.zhou@intel.com>
    Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 13 zhoujian 2014-09-26 02:19:02 UTC
Verified it,verified commit:(drm-intel-nightly)git-0f7cc12
Comment 14 Jari Tahvanainen 2017-09-04 10:27:31 UTC
Closing old verified+fixed.


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.