Bug 72906 - [IVB/HSW bisected] 3D performance (e.g. padman, smokin-guns,urbanterror) reduced by 20%, ~50% with GLB 2.7 Egypt on GT3e
Summary: [IVB/HSW bisected] 3D performance (e.g. padman, smokin-guns,urbanterror) redu...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high critical
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-20 09:28 UTC by zhoujian
Modified: 2016-12-07 16:28 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg.log (4.67 KB, text/plain)
2013-12-20 09:29 UTC, zhoujian
no flags Details
Xorg.0.log (18.09 KB, text/plain)
2013-12-20 09:31 UTC, zhoujian
no flags Details
Only bind once! (21.46 KB, patch)
2013-12-30 19:47 UTC, Chris Wilson
no flags Details | Splinter Review
Only bind once! (21.62 KB, patch)
2013-12-30 20:08 UTC, Chris Wilson
no flags Details | Splinter Review
Only bind once! (21.03 KB, patch)
2013-12-30 22:36 UTC, Ben Widawsky
no flags Details | Splinter Review

Description zhoujian 2013-12-20 09:28:47 UTC
System Environment:
--------------------------
Platform: IVB/HSW
Libdrm:(master)libdrm-2.4.50-3-g068ea68b3f7ebd5efcfcc2f6ae417651423c8382
Mesa:(master)149140e922a9fbf892c60a755788fb88d9757749
Xf86_video_intel:(master)2.99.906-98-g9289e2c56b7f0cc78c5
Libva:(staging)feb43645518a9c9c17c39a19c0b1998e99d2e156
Kernel:(drm-intel-nightly)074fdf374fa296c16a7449b9d2d4ad6ff73c0c8d

Bug detailed description:
-------------------------
3D performance(e.g. padman, somkin-guns,urbanterror) reduced by 20%. 
It’s kernel -ppgtt regression. It works well on other branches (drm-fixes, drm-intel-fixes, drm-intel-next-queued, drm-next, core-stuff). Please see dmesg.log and Xorg.0.log.
By bisected, the first bad commit is:
commit 7e0d96bc03c140cb8183955ad6f0290caa731e64
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Fri Dec 6 14:11:26 2013 -0800
drm/i915: Use multiple VMs -- the point of no return

It can’t be reverted the bisected commit on git-a7c1d4.
The bisected commit would cause “X no responsive” when run GpuTest v0.5 pixmark_volplosion. BTW, there is no error with i915_error_state.

Call Trace:
-----------------------------------------------
[  359.248800]  [<ffffffffa00739be>] ? i915_vma_unbind+0x8e/0x176 [i915]
[  359.248827]  [<ffffffffa0077a6e>] ? i915_gem_evict_vm+0x51/0x80 [i915]
[  359.248853]  [<ffffffffa00764f0>] ? i915_gem_context_free+0xcf/0x14c [i915]
[  359.248880]  [<ffffffffa00774e4>] ? i915_gem_context_close+0x7b/0x7d [i915]
[  359.248907]  [<ffffffffa0060b32>] ? i915_driver_preclose+0x21/0x38 [i915]
[  359.248933]  [<ffffffffa0003bdc>] ? drm_release+0x69/0x541 [drm]
[  359.248956]  [<ffffffff810be30f>] ? remove_vma+0x5b/0x62
[  359.248975]  [<ffffffff810dc1df>] ? __fput+0xdb/0x1cc
[  359.248994]  [<ffffffff81047610>] ? task_work_run+0x73/0x87
[  359.249014]  [<ffffffff810024d8>] ? do_notify_resume+0x53/0x68
[  359.249036]  [<ffffffff8171c1aa>] ? int_signal+0x12/0x17

Performance status
-----------------------
Test on IVB with Raw X(1920x1080)
          git-3d7f0f9dc    git-7e0d96bc0
padman,      187.8           142.5
smokin-guns, 152.3           110.3
urbanterror, 116.3           94.5


Reproduce steps:
-------------------------
1.xinit&
2.vblank_mode=0 ./smokinguns.x86_64 +set r_fullscreen 1 +timedemo 1 +set demodone "quit" +set demoloop1 "demo pts; set nextdemo vstr demodone" +vstr demoloop1 +set r_customwidth 1920 +set r_customheight 1080
Comment 1 zhoujian 2013-12-20 09:29:24 UTC
Created attachment 91030 [details]
dmesg.log
Comment 2 zhoujian 2013-12-20 09:31:24 UTC
Created attachment 91031 [details]
Xorg.0.log
Comment 3 Ben Widawsky 2013-12-22 06:57:42 UTC
Can you make ssre this is not reproducible aliasing ppgtt only? Please load the module with i915_enable_ppgtt=1 to test
Comment 4 zhoujian 2013-12-23 02:35:04 UTC
(In reply to comment #3)
> Can you make ssre this is not reproducible aliasing ppgtt only? Please load
> the module with i915_enable_ppgtt=1 to test
This problem exist on ppgtt branch only.with i915_enable_ppgtt=1 to test,the problem still existence.
Comment 5 Chris Wilson 2013-12-30 16:02:53 UTC
i915_gem_execbuffer_reserve_vma() doesn't.
Comment 6 Chris Wilson 2013-12-30 19:47:05 UTC
Created attachment 91344 [details] [review]
Only bind once!
Comment 7 Chris Wilson 2013-12-30 20:08:51 UTC
Created attachment 91345 [details] [review]
Only bind once!

Moved the global bind check down into pin() to catch more potential issues.
Comment 8 Ben Widawsky 2013-12-30 22:36:58 UTC
Created attachment 91351 [details] [review]
Only bind once!

Removed the i915_gem_exec.c hunk for QA's ease.
Comment 9 zhoujian 2013-12-31 07:15:03 UTC
(In reply to comment #8)
> Created attachment 91351 [details] [review] [review]
> Only bind once!
> 
> Removed the i915_gem_exec.c hunk for QA's ease.
Based on ppgtt git-a7c1d426e,with the patch it works well.
Comment 10 lu hua 2014-01-07 01:40:21 UTC
When run nightly piglit testing on Ivybridge and Haswell, It randomly has "X no responsive" issue.

dmesg:
[  275.573184] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[  275.573226] IP: [<ffffffffa008c473>] i915_gem_gtt_finish_object+0x73/0xc8 [i915]
[  275.573272] PGD b410e067 PUD c7525067 PMD 0
[  275.573295] Oops: 0000 [#1] SMP
[  275.573313] Modules linked in: bnep bluetooth rfkill ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT iptable_mangle xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc ipv6 dm_mod dcdbas snd_hda_codec_hdmi iTCO_wdt iTCO_vendor_support snd_hda_codec_realtek serio_raw pcspkr snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc lpc_ich i2c_i801 mfd_core snd_timer snd soundcore acpi_cpufreq i915 video button drm_kms_helper drm
[  275.573563] CPU: 2 PID: 4309 Comm: arb_color_buffe Not tainted 3.13.0-rc4_drm-intel-nightly_2c21a5_20140106_debug+ #100
[  275.573607] Hardware name: Dell Inc. OptiPlex 9010/03JR84, BIOS A01 05/04/2012
[  275.573638] task: ffff8800c6c93fa0 ti: ffff8800b7568000 task.ti: ffff8800b7568000
[  275.573669] RIP: 0010:[<ffffffffa008c473>]  [<ffffffffa008c473>] i915_gem_gtt_finish_object+0x73/0xc8 [i915]
[  275.573718] RSP: 0018:ffff8800b7569d18  EFLAGS: 00010246
[  275.573740] RAX: 0000000000000000 RBX: ffff880003740000 RCX: ffff8800befe5000
[  275.573770] RDX: 0000000000000011 RSI: 0000000000000011 RDI: ffff8801156101c0
[  275.573800] RBP: ffff8800b7569d38 R08: 0000160000000000 R09: ffff880000000000
[  275.573830] R10: 0000000000000010 R11: ffff8801156101c0 R12: ffff8801156101c0
[  275.573860] R13: 0000000000000001 R14: ffff880118545000 R15: ffff880003740000
[  275.573890] FS:  00007f7e0cb30740(0000) GS:ffff88011e300000(0000) knlGS:0000000000000000
[  275.573923] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  275.573948] CR2: 0000000000000008 CR3: 00000000b7443000 CR4: 00000000001407e0
[  275.573977] Stack:
[  275.573987]  ffff8801156101c0 ffff880003348d80 0000000000000000 ffff8801189e3268
[  275.574023]  ffff8800b7569d78 ffffffffa0082d37 ffff8800d4880898 ffff8800d4880898
[  275.574058]  ffff8800d48808f0 ffff880118545000 ffff8801189e3268 ffff8800b746f690
[  275.574094] Call Trace:
[  275.574114]  [<ffffffffa0082d37>] i915_vma_unbind+0xc3/0x180 [i915]
[  275.574147]  [<ffffffffa00873a0>] i915_gem_evict_vm+0x88/0xd2 [i915]
[  275.574180]  [<ffffffffa0085c93>] i915_gem_context_free+0xd7/0x134 [i915]
[  275.574215]  [<ffffffffa0086d1b>] i915_gem_context_close+0x84/0x8b [i915]
[  275.574248]  [<ffffffffa0073e47>] i915_driver_preclose+0x2e/0x49 [i915]
[  275.574281]  [<ffffffffa0073e19>] ? i915_driver_lastclose+0x40/0x40 [i915]
[  275.574316]  [<ffffffffa0003f23>] drm_release+0x77/0x4c4 [drm]
[  275.574343]  [<ffffffff8112b081>] __fput+0xed/0x1e3
[  275.574365]  [<ffffffff8112b1af>] ____fput+0xe/0x10
[  275.574388]  [<ffffffff81054ddc>] task_work_run+0x7e/0x96
[  275.574412]  [<ffffffff810025f8>] do_notify_resume+0x5a/0x6b
[  275.574439]  [<ffffffff813784ae>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[  275.574467]  [<ffffffff8181a8da>] int_signal+0x12/0x17
[  275.574489] Code: 48 c7 c6 39 fa 0e a0 31 c0 e8 ef b8 f7 ff bf c6 a7 00 00 e8 0b ae 2e e1 41 f6 84 24 3b 01 00 00 01 75 44 49 8b 84 24 40 01 00 00 <8b> 50 08 48 8b 30 49 8b 86 90 03 00 00 48 89 c7 48 81 c7 98 00
[  275.574651] RIP  [<ffffffffa008c473>] i915_gem_gtt_finish_object+0x73/0xc8 [i915]
[  275.574689]  RSP <ffff8800b7569d18>
[  275.574704] CR2: 0000000000000008
[  275.578714] ---[ end trace 34d8cec1bb111f7b ]---
Comment 11 Chris Wilson 2014-01-07 17:02:45 UTC
(In reply to comment #10)
> When run nightly piglit testing on Ivybridge and Haswell, It randomly has "X
> no responsive" issue.

Please file this as a separate bug report since it is not related to the performance regression.
Comment 12 Eero Tamminen 2014-01-15 16:54:36 UTC
There were quite a few changes between 18th and 24th of December (tests for different HW happened at different times) in performance in the QA numbers, so I'm not completely sure which of these are relevant for this bug, and which are e.g. for bug 73213.  Anyway, here are the observations from the numbers:

Performance regression visible in the numbers for 2013-12-19 test is largest for HSW mobile with GT3e, every test has regressed, by 2 - 50%, with GLBenchmark 2.7 Egypt HD suffering most, then Smoking Guns and Padman etc.  All of these are very high FPS benchmarks.  HSW GT3 Ultrabook numbers regressed almost as badly.

HSW GT2 desktop numbers regressed by 0 - 10% (+ one x11perf test 20%).

IVB Desktop numbers regressed by -1 - 30%, with worst regressions being for the programs mentioned here.

(In BYT case, regression is largest for GpuTest volexplosion (-16%), which test is 100% pixel shader, not memory limited, and has very low FPS.  That seems unrelated issue.)
Comment 13 Gordon Jin 2014-01-19 01:47:02 UTC
Can we move forward on this bug? It has been bisected on -ppgtt and with a working patch.
Comment 14 Jani Nikula 2014-01-20 13:43:49 UTC
Chris, is there a new version of the patch?
http://mid.gmane.org/1388584856-9100-1-git-send-email-chris@chris-wilson.co.uk
Comment 15 Chris Wilson 2014-01-20 13:51:32 UTC
Nope, I thought splitting it further would be counterproductive.
Comment 16 Eero Tamminen 2014-01-27 13:17:01 UTC
If we disregard BYT volexplosion results, the issue is least visible on tests that are EU ALU bound, i.e. it can indeed be memory (pgtt) related.
Comment 17 Daniel Vetter 2014-02-14 12:57:58 UTC
Jani asked me to confirm that "yes, this regression won't show up in 3.14 since the offending patches are _only_ queued for 3.15+".
Comment 18 meng 2014-02-18 09:11:46 UTC
A Kernel patch on -dinq would fix the bug.
-------------------------------
8ea99c928787ba1712b7506b4c56c948c45d84b1 is the first bad commit
commit 8ea99c928787ba1712b7506b4c56c948c45d84b1
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Feb 14 14:01:21 2014 +0100

    drm/i915: Only bind each object rather than for every execbuffer
Comment 19 meng 2014-02-18 09:15:13 UTC
Btw, “X no responsive” when run GpuTest v0.5 pixmark_volplosion still exists.
(Bug 73383)
Comment 20 Jari Tahvanainen 2016-12-07 16:28:22 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.